nginx slow for no reason

Antoine Bonavita antoine.bonavita at gmail.com
Mon Aug 8 13:26:08 UTC 2011


Hello,

On Mon, Aug 8, 2011 at 2:57 PM, Marki555 <nginx-forum at nginx.us> wrote:
> Hello,
> I am running nginx 0.7.67-3 on debian, now without php, mostly serving
> one empty html. It was working fine for several weeks, handling about
> 800 connections per second with 2 work processes. Few days ago it
> started to be very slow, during peak hours almost impossible to connect,
> but I don't see any bottleneck. I tried increasing the number of
> workers, using one 1 worker, using multi_accept - nothing helped. What I
> see on server is that I have more than 500 sockets in SYN_RECV state and
> nginx process seems to be doing nothing... strace shows this:
Could someone/thing be trying to SYN flood you ?
Do they all come from same IP/block ?
Can you provide a little sample of the output of netstat -tnp | grep SYN_RECV  ?

A.

>
> gettimeofday({1312807826, 920091}, NULL) = 0
> epoll_wait(16, {}, 512, 500)            = 0
> gettimeofday({1312807827, 421795}, NULL) = 0
> epoll_wait(16, {}, 512, 500)            = 0
> gettimeofday({1312807827, 923222}, NULL) = 0
> epoll_wait(16, {}, 512, 500)            = 0
> gettimeofday({1312807828, 424994}, NULL) = 0
> epoll_wait(16, {}, 512, 500)            = 0
> gettimeofday({1312807828, 926449}, NULL) = 0
> epoll_wait(16, {}, 512, 500)            = 0
> gettimeofday({1312807829, 428064}, NULL) = 0
> epoll_wait(16, {}, 512, 500)            = 0
>
> like if it had nothing to do - despite those waiting connections... I
> din't change anything on the server or nginx itself. Maybe the traffic
> is different (coming from different countries for example), but that
> shouldn't have any influence.
> The traffic is being moved from this old server and domain to a new one.
> The bad thing is that today the slowness started also on the new server!
> There we have nginx 1.0.5 from debian dotdeb with php5-fpm. Traffic is
> to one php script which does one INSERT to the mysql (ad tracking). The
> new server has 6 GB RAM, 6-core Xeon CPU and is almost idle.
>
> epoll_wait(6, {}, 512, 500)             = 0
> epoll_wait(6, {}, 512, 500)             = 0
> epoll_wait(6, {}, 512, 500)             = 0
> epoll_wait(6, {}, 512, 500)             = 0
> epoll_wait(6, {}, 512, 500)             = 0
>
> What could be the problem?
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,213502,213502#msg-213502
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



More information about the nginx mailing list