[SOLVED] Delay in network operations

A place to ask all newbie questions and not get flamed, though you will get beaten down if you post a newbieish question outside of these walls.
Post Reply
doragasu
Linux User
Posts: 14
Joined: Sat Apr 08, 2006 9:10 am

[SOLVED] Delay in network operations

Post by doragasu »

I have noticed there's a delay of several seconds in some network operations. For example, when I log in using SSH, there's a delay before I'm asked to input the password. Also when using proftpd there are delays every time I change a directory or try to transfer a file.

What is causing this delay? Is there a way to eliminate it?
Last edited by doragasu on Tue Oct 31, 2006 3:57 pm, edited 1 time in total.
fredgarvin
Newbie
Posts: 3
Joined: Sun Sep 24, 2006 9:04 pm

Post by fredgarvin »

Look at /var/log/auth.log

Do you see entries in there about failed DNS lookups? Or failed reverse DNS or reverse IP lookups? I'm guessing that's the case.

If so, edit /etc/ssh/sshd_config and look for a line with "UseDNS" on it.

If it has a # in front of it, remove the #. (The # comments out the line).
Edit the line so it says:
UseDNS no

After saving your file, you'll have to restart the sshd process so your change takes effect. You'll probably want to have access to your console when you do this, in case your sshd doesn't restart cleanly...you won't have ssh access until it restarts!

To bounce the sshd process, just do this:
/etc/init.d/sshd restart

(Oh, you'll either have to be logged on as root or use sudo).

The pause with ftp MIGHT be a similar issue, but I can't help you out there as I don't use proftp.

-J
orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post by orochi »

login via SSH and check your available memory and system performance by running:


free

top

ps aux
doragasu
Linux User
Posts: 14
Joined: Sat Apr 08, 2006 9:10 am

Post by doragasu »

Thanks a lot fredgarving, it was because of the DNS timeout. Now SSH works perfect.

I hope I can find the way to remove the delay in proftpd...

Also thanks orochi for your tip, but in this case, it isn't a resource problem.
doragasu
Linux User
Posts: 14
Joined: Sat Apr 08, 2006 9:10 am

Post by doragasu »

Finally I have found the way to remove delays in proftpd. I have added the next line to proftpd.conf in /etc/proftpd:

Code: Select all

UseReverseDNS off
Again, thanks a lot for help.
orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post by orochi »

cat /etc/resolv.conf

is it empty?
doragasu
Linux User
Posts: 14
Joined: Sat Apr 08, 2006 9:10 am

Post by doragasu »

No, it's not empty. It has configured my primary and secondary DNS.
Post Reply