Welcome! Log In Create A New Profile

Advanced

Re: nginx slow for no reason

Maxim Dounin
August 08, 2011 04:02PM
Hello!

On Mon, Aug 08, 2011 at 02:01:55PM -0400, Marki555 wrote:

> Thanks, I wasn't sure whether kernel or nginx replies to the SYN
> packets. Now the question is how can I check for the network problems.
> SYN_RECV is also when kernel has replied with SYN+ACK, but I waiting for
> a final ACK? But SYN_RECV is also when user-space is unable to accept()
> the new connections so fast. How can I distinguish between these 2
> reasons?

Again: SYN_RECV connections are sitting in kernel waiting for ACK
to happen. Only ESTABLISHED connections are passed to userland.

SYN_RECV connections may appear on Linux as a result of listen
queue being overflowed (as Linux just drops ACKs by default if
there isn't enough room in listen queue), but this is *not* a
listen queue, these connections can't be acepted. This is rather
artifact of the way how Linux handles listen queue overflows.

> But anyway, why should that prevent legitimate normal connections from
> being accepted? When I try to access nginx' server-status, I am waiting
> for many seconds...

First of all, you may want to actually check how many connections
are sitting in listen queue. Under FreeBSD use

netstat -Lan

to find queue lengths. Under Linux 2.6.18+ it should be possible
to examine listen queue with

ss -nlt

For older Linux versions check

netstat -ntp

and count connections in ESTABLISHED state without associated
process.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx slow for no reason

Marki555 August 08, 2011 08:57AM

Re: nginx slow for no reason

Antoine Bonavita August 08, 2011 09:28AM

Re: nginx slow for no reason

Marki555 August 08, 2011 09:41AM

Re: nginx slow for no reason

Marki555 August 08, 2011 02:01PM

Re: nginx slow for no reason

Marki555 August 10, 2011 11:02AM

Re: nginx slow for no reason

Antoine Bonavita August 08, 2011 10:10AM

Re: nginx slow for no reason

Maxim Dounin August 08, 2011 10:34AM

Re: nginx slow for no reason

Maxim Dounin August 08, 2011 04:02PM

Re: nginx slow for no reason

Mark Alan August 08, 2011 04:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 191
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready