Date: Mon, 7 Dec 1998 16:18:07 -0600 From: Dan Nelson <dnelson@emsphone.com> To: graeme@echidna.com, FreeBSD-questions@FreeBSD.ORG Subject: Re: ftpd doesn't always die with broken connections Message-ID: <19981207161806.A77669@emsphone.com> In-Reply-To: <366C4FA4.C67199B0@echidna.com>; from "Graeme Tait" on Mon Dec 7 16:59:00 GMT 1998 References: <366C4FA4.C67199B0@echidna.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Dec 07), Graeme Tait said: > I have a couple of FreeBSD servers (2.2.6R and 2.2.7S) to/from which > large files are often transferred by users with dial-up ISP access. > Inevitably the connections fail occasionally in mid-transfer. > > Most of the time the ftpd daemon goes away gracefully in a few > minutes. But sometimes it hangs around much longer, or indefinitely: > > From ps aux | grep ftpd (done today): > > 3940 0.0 0.1 292 184 ?? Is 16Nov98 0:01.82 ftpd: ip219.tu > 10051 0.0 0.1 292 184 ?? Is 16Nov98 0:00.05 ftpd: ip-50-10 > > Running netstat shows connections ESTABLISHED on local ports 20 and > 21 for the above two remote hosts. .. which means that the transfer to/from the other machine has stopped. Judging by the partial hostnames, I'd guess that the other end was a dialup connection that lost its connection during an upload. ftpd is simply waiting in a read() call for data that will never come. The process isn't dying because the idle timeout only applies at the ftp prompt, not when transferring data. Try turning keepalives on. That should drop the connection four hours after the client disappears. sysctl -w net.inet.tcp.always_keepalive=1 -Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981207161806.A77669>