LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   slow ftpd response (http://www.linuxquestions.org/questions/linux-general-1/slow-ftpd-response-407928/)

bmeckle 01-25-2006 04:10 PM

slow ftpd response
 
I am trying to script an ftp to run every minute, but when I connect to my ftp server (running ftpd) it takes like a minute for the prompt to come back. I believe this is caused by the server trying to do a DNS reverse lookup. Is there a way to turn off the reverse look up for ftp? Or a way to minimize the time out for this?

Thanks in advance.

trickykid 01-26-2006 09:21 AM

Why not setup proper DNS settings instead? It might also be that your trying to use passive FTP, try toggling this setting as well.

bmeckle 01-26-2006 09:31 AM

Good point. Something that I also thought of. Unfortunately the reason it is set up this way is for security reasons. Also passive ftp needs to be used because traffic to and from the ftpd server is regulated by a firewall.

Looking at the man pages for nsswitch.conf I see something about a lookup time-out setting. Does anybody know anything about this?

Thanks in advance.

Bob

stress_junkie 01-26-2006 04:52 PM

You might try setting up the ftpd daemon as a stand alone process rather than having inetd spawn it on demand. I'm thinking that when inetd spawns your ftpd it has to read the binary off of the disk. If it was a running process then it wouldn't need to start a process and read the disk before it responded to your ftp connect request.

If you are using vsftp then instructions for setting this up are in the /etc/vsftp.conf file.

bmeckle 01-27-2006 08:57 AM

Thanks for the response. In researching the problem I found that Solaris 9 has an issue with this due to the way in.ftpd does not use nsswitch.conf for name resolution. It uses an older process, there is a patch to fix this, and we are currently in the process of applying this patch. This should allow us to set up an entry in /etc/hosts for this system and cut out the time out of the name resolution. In the mean time I removed the secondary DNS server from resolv.conf which cut the lookup time from over a minute to about 15 seconds.

Thanks, again for your responses.


All times are GMT -5. The time now is 01:53 AM.