[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FreeBSD 7.0: sockets stuck in CLOSED state...



Good day.

Wed, Jun 25, 2008 at 07:43:12PM +0200, Ali Niknam wrote:
> Recently i've been upgrading some of my machines from FreeBSD 6.x amd64 
> to FreeBSD 7.0 amd64.
> 
> After upgrading I noticed a weird error/bug. It seems that after several 
> thousand TCP connections some seem to hang in 'CLOSED' state.
> 
> netstat -n gives:
> ...
> tcp4      0       0  1.2.3.4.*          4.5.6.7.42149       CLOSED
> tcp4      39      0  1.2.3.4.*          4.5.6.7.54103       CLOSED
> tcp4      35      0  1.2.3.4.*          4.5.6.7.41718       CLOSED
> tcp4      38      0  1.2.3.4.*          4.5.6.7.55618       CLOSED
> tcp4      41      0  1.2.3.4.*          4.5.6.7.44230       CLOSED
> tcp4      39      0  1.2.3.4.*          4.5.6.7.49439       CLOSED
> ...

Just a quick "me too" message: I also used to see this on my 7.x
machines.  This was with Apache servers in the proxy setup: one
Apache was listening to the external requests and routing them to
the internal servers that are also running Apache.  I refrained from
such setup and traded front-end Apache to nginx -- CLOSED sockets
gone away.

I had already tried to debug this situation and Mike Silbersack
helped me with patching the kernel.  At that days his patches (that
went into 7.x) helped, but with higher request rate to the Apache,
they seem to be back again.  I can try to setup the testbed and
verify if I will still be able to reproduce them.  Will it be needed?

> These never go away; they gradually increase and increase until the 
> application starts giving errors (probably because some socket or 
> filedescriptor limit is reached). When the application is killed these 
> entries disappear.
> 
> The application in question is a self written DNS server, multithreaded, 
> and running fine for years without any troubles on both BSD 5.x as well 
> as 6.x. Also 32bits as well as 64bits on 6.x.

Mine was Apache 2.2.x with fork model, no threading.
-- 
Eygene
_______________________________________________
freebsd-net_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe_(_at_)_freebsd_(_dot_)_org"