Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Dec 1998 16:10:02 -0500
From:      Graeme Tait <graeme@echidna.com>
To:        Dan Nelson <dnelson@emsphone.com>
Cc:        FreeBSD-questions@FreeBSD.ORG
Subject:   Re: ftpd doesn't always die with broken connections
Message-ID:  <366D95AA.B1CD18BE@echidna.com>
References:  <366C4FA4.C67199B0@echidna.com> <19981207161806.A77669@emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks - that did the trick. Actually one of the two residual ftp processes went
away in about an hour after I enabled the keepalive, the other in about an hour
and a half. Apparently, I got credit for time already on the clock (a mere 22
days!).

If I want to ensure the keepalive remains in effect after a reboot, is it
appropriate to add the sysctl command to rc.local or is some other way
preferred?


What is the downside to having keepalives on? I came across information that
seemed very negative about using them, but if connections are only probed every
four hours, what harm could be done?


--
Graeme Tait - Echidna



Dan Nelson wrote:
> 
> 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?366D95AA.B1CD18BE>