Re: Too many sockets in SYN_RECV
On 12/06/2011 05:30 PM, Marek Podmaka wrote:
> Hello Debian-isp,
> On almost idle server (12 GB RAM, 2x 6-core xeon, utilized to about
> 15-20%) I am running nginx serving one small php file over php5-fpm.
> It is ad tracking site, so it has many connections per second from all
> over the world.
> During the peak hours (about 1500 conns/s) the response time goes high
> - I want to get the nginx status page and I often get connection
> timeout. I guess it is because there are too many connections waiting
> in SYN_RECV state (it tops at 512 - is it possible to increase it).
> But the server is almost idle, stracing nginx shows that it is
> normally processing incoming connections. I tried increasing the
> number of nginx worker processes, but it didn't help.
> As I have learned, connection is ready for accept() by nginx only
> after it is ESTABLISHED, so these SYN_RECV must be waiting in the
> kernel for some reason...
> Debian squeeze, 2.6.32-5-amd64, php & nginx from dotdeb
Have you tried using syn cookies? That normally helps a lot when you
have a great amount of connections. I'm not sure if the Debian kernel
uses it by default though (you might need to rebuild the kernel???).