View Full Version : Slow ftp and ssh :(
gili
23rd June 2006, 09:08
Hello!
Sorry for poor english. I hope you will understand my problem.
I installed the debian 3.1 + ISP config (perfect setup tutorial).
Everything worked excellent!!
But now my ftp and ssh connections very very slow!!
I start the putty, asks the username, and here comes the waiting after 70sec the asks the password :(:(:(
FTP:
[08:02:13] LIST -aL
[08:04:30] 150 Opening ASCII mode data connection for file list
[08:04:30] 2123 bytes transferred. (211 bájt/s) (00:00:10)
[08:04:30] 226 Transfer complete.
can you help me?
thx
gili
marclar
23rd June 2006, 20:13
1. First check the ping to your server.
2. Is your server in your local network? If not, check the speed of your internet connection.
3. Maybe server is running some script all the time, and is very busy because of that.
Maybe you added any jobs in "crontab"?
4. type "top" to your console, and check which process takes lots of memory
5. Try to reboot the server.
Hope it helps..,
;)
adamluz
23rd June 2006, 22:12
Could also be a ram issue as I recently had that issue which slowed down the login.
edge
24th June 2006, 12:58
Not sure if you have more IP's on the server (like virtual NIC's with IP's), but if so, try connecting to the 1st IP (the one running on eth0)
When I FTP to one of my virtual NIC's the system is also slow, but as soon as I use the 1st real NIC, it's fast as hell!
I have no clue what is causing this..
falko
24th June 2006, 14:55
Any errors in your log files related to your problem?
Could be a firewall problem. What's the output of netstat -tap and iptables -L?
When I FTP to one of my virtual NIC's the system is also slow, but as soon as I use the 1st real NIC, it's fast as hell!
Same on my Debian 3.1 with Proftpd. Not a matter of RAM or CPU (2GB RAM and 3GHz CPU, <2% load) but connecting to the second ip on the NIC is slow. Transfer speed is good but it takes 5-10 seconds between connection is established and the greeting and username/password prompt.
Not a clue as to what is causing it. Just strange and annoying...
//Erk
mphayesuk
27th June 2006, 14:20
Not really adding a solution here but I have noticed ftp and ssh running slow, if I connect to the control panel its fine but ftp really slow. I have similar spec machine and I have suse 10 64bit installed.
falko
28th June 2006, 11:04
Have you tried both active and passive transfers in your FTP client?
gili,
I had the same problem when I started to use an other firewall with IPtables..
I do not know if you are using an other firewall, or the one from ISPconfig.
If so..
Try as test dissabling the firewall, and see if this will speed up the login verification.
If it does speed up, try using the ISPconfig firewall option (in Management > Services > Firewall) and see if all is still okay.
Hello,
Sorry for the late answer,
I try your tips, but nothing changed!
Active, Passive nothing chaged!
Firewall, I use only ISPConfig's firewall, and if I stop that, or Start that, nothing changed.
Cached: 496184 kB
SwapCached: 0 kB
Active: 500956 kB
Inactive: 301108 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 906736 kB
LowFree: 28956 kB
SwapTotal: 2650684 kB
SwapFree: 2650684 kB
Dirty: 788 kB
Writeback: 0 kB
Mapped: 144608 kB
Slab: 66840 kB
Committed_AS: 324916 kB
PageTables: 1184 kB
VmallocTotal: 122800 kB
VmallocUsed: 5116 kB
VmallocChunk: 117528 kB
That is ispconf. mem stat!
I where show my 2gig mem?
# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 localhost.localdo:mysql *:* LISTEN 1987/mysqld
tcp 0 0 *:81 *:* LISTEN 2214/ispconfig_http
tcp 0 0 *:ftp *:* LISTEN 2404/proftpd: (acce
tcp 0 0 debian.bozeti.hu:domain *:* LISTEN 3869/named
tcp 0 0 localhost.locald:domain *:* LISTEN 3869/named
tcp 0 0 *:smtp *:* LISTEN 2547/master
tcp 0 0 localhost.localdoma:953 *:* LISTEN 3869/named
tcp 0 0 d___.b____.hu:ftp 87.97.81.185.pool:63444 ESTABLISHED12300/proftpd: web2
tcp6 0 0 *:imaps *:* LISTEN 1904/couriertcpd
tcp6 0 0 *:pop3s *:* LISTEN 1925/couriertcpd
tcp6 0 0 *:pop3 *:* LISTEN 1912/couriertcpd
tcp6 0 0 *:imap2 *:* LISTEN 1891/couriertcpd
tcp6 0 0 *:www *:* LISTEN 3743/apache2
tcp6 0 0 *:ssh *:* LISTEN 2142/sshd
tcp6 0 0 *:smtp *:* LISTEN 2547/master
tcp6 0 0 ip6-localhost:953 *:* LISTEN 3869/named
tcp6 0 0 *:https *:* LISTEN 3743/apache2
tcp6 0 0 m______.hu:ssh 87.97.81.185.pool:63459 ESTABLISHED12483/0
tcp6 0 0 www.c_____.hu:www bnc.chaosteam.hu:35777 TIME_WAIT -
tcp6 0 0 b______.hu:pop3 gw.zrinyi-berzence:1153 TIME_WAIT -
tcp6 0 0 www.m____.hu:pop3 gw.zrinyi-berzence:1153 TIME_WAIT -
tcp6 0 0 cs____.hu:pop3 gw.zrinyi-berzence:1154 TIME_WAIT -
#
# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
DROP tcp -- anywhere 127.0.0.0/8
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
DROP all -- BASE-ADDRESS.MCAST.NET/4 anywhere
PUB_IN all -- anywhere anywhere
PUB_IN all -- anywhere anywhere
PUB_IN all -- anywhere anywhere
PUB_IN all -- anywhere anywhere
DROP all -- anywhere anywhere
Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
PUB_OUT all -- anywhere anywhere
PUB_OUT all -- anywhere anywhere
PUB_OUT all -- anywhere anywhere
PUB_OUT all -- anywhere anywhere
Chain INT_IN (0 references)
target prot opt source destination
ACCEPT icmp -- anywhere anywhere
DROP all -- anywhere anywhere
Chain INT_OUT (0 references)
target prot opt source destination
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain PAROLE (8 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain PUB_IN (4 references)
target prot opt source destination
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable
ACCEPT icmp -- anywhere anywhere icmp echo-reply
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT icmp -- anywhere anywhere icmp echo-request
PAROLE tcp -- anywhere anywhere tcp dpt:ftp
PAROLE tcp -- anywhere anywhere tcp dpt:ssh
PAROLE tcp -- anywhere anywhere tcp dpt:smtp
PAROLE tcp -- anywhere anywhere tcp dpt:domain
PAROLE tcp -- anywhere anywhere tcp dpt:www
PAROLE tcp -- anywhere anywhere tcp dpt:81
PAROLE tcp -- anywhere anywhere tcp dpt:pop3
PAROLE tcp -- anywhere anywhere tcp dpt:https
ACCEPT udp -- anywhere anywhere udp dpt:domain
DROP icmp -- anywhere anywhere
DROP all -- anywhere anywhere
Chain PUB_OUT (4 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
#
I don't have second IP!
debian:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:__:D_:C_:6_:_
inet addr:1__.2__.6__.9__ Bcast:1__.2__.6__.2__ Mask:255.255.255.0
inet6 addr: f__::2__:d__:f__:6___/__ Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4369036 errors:0 dropped:0 overruns:0 frame:0
TX packets:361745 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:362454471 (345.6 MiB) TX bytes:266474558 (254.1 MiB)
Interrupt:209 Memory:feafc000-0
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:34136 errors:0 dropped:0 overruns:0 frame:0
TX packets:34136 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3577031 (3.4 MiB) TX bytes:3577031 (3.4 MiB)
#
# crontab -e
30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null
0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null
top - 08:26:16 up 2 days, 12:17, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 83 total, 2 running, 81 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 906736k total, 877396k used, 29340k free, 178288k buffers
Swap: 2650684k total, 0k used, 2650684k free, 496212k cached
So, please help me somebody!
Thanks!
Gili
falko
8th July 2006, 12:57
Maybe the firewall on your client computer causes the problem... You might try to disable it for testing purposes.
gili
11th July 2006, 13:43
Thank Falko,
I turn off the firewall in my computer, the time of connect is better. But not perfect!
If anybody has something good idea, please write me!
Good Bye
Gili
MvincM
11th July 2006, 23:24
Hi,
For guys who have slow login to ftp try to disable Ident in Proftpd - is should helps.
Best regards,
MvincM
gili
14th July 2006, 21:33
Hi,
For guys who have slow login to ftp try to disable Ident in Proftpd - is should helps.
Best regards,
MvincM
Ok but where I need disable this IDENT?
And I found that:
/var/log/debug:
:41 debian proftpd[5894]: debian.bozeti.hu (87.97.92.42.pool.invitel.hu[87.97.92.42]) - mod_delay/0.4: delaying for 13 usecs
:41 debian proftpd[5894]: debian.bozeti.hu (87.97.92.42.pool.invitel.hu[87.97.92.42]) - mod_delay/0.4: delaying for 22 usecs
What is that, and where I need disable this?
Where can I found some log from proftpd, and which is the main config, and is this /etc/proftpd.conf?
Can I change this?
How to restart proftpd? :)
Because I make this
/etc/init.d/proftpd restart
I get error message:
.. - warning: "ProFTPD" address/port (193.202.63.97:21) already in use by "Debian"
:) too much question :)
Please help me!
Thanks for much help!
Byz
Gili
gili
14th July 2006, 21:59
I solve that!!!!!!!
I have a some problem with reverse dns!
I wrote that to proftpd.conf
UseReverseDNS off
And thats works!!
Thaks for all!
Bye
Gili
nenad
6th August 2006, 17:22
What about
DelayEngine off ?
vincentthe
17th January 2007, 11:07
I have similar problems, but this time only with FTP. Connecting to SSH works fast.
On my other servers (FreeBSD) slow connection-setups to ProFTP were solved by adding "UseReverseDNS off" but somehow this doesn't help on the Ubuntu 6.06 LTS I'm running now (in combination with a windows client).
The problem should be somewhere on the client. I used several ftp clients including the command line, firewalls and internet rules are triple checked and switched on/off. The strange thing is that connections to other servers are quick (as well as connecting to ssh on this ubuntu server).
The tranfser speeds once connected are all good, but I just can't connect within 15 seconds which is quite irritating.
Identlookups and ReverseDNS are of. Is there anything I overlooked in the settings for my server, or are there other things I can check on my client?
jnsc
17th January 2007, 12:20
are they off in the <Global></Global> section as described here http://howtoforge.com/forums/showpost.php?p=49809&postcount=7
vincentthe
17th January 2007, 12:26
Aargh, stupid. That solved the problem :)
bswinnerton
14th April 2008, 02:53
Wow, That has to be the best fix i've seen in a while. I just thought I had a slow connection, but it is like lightening now. Is there any toll with turning off reversedns?
Sarpenter
6th May 2008, 17:24
If you followed debian 4 perfect setup guide, you should add this line to work ftp faster: UseReverseDNS off
/etc/proftpd/proftpd.conf
UseIPv6 off <- change here to off
DefaultRoot ~ <- Additional lines for security.
IdentLookups off
ServerIdent on "FTP Server ready."
UseReverseDNS off <- Additional line to work faster :)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.