All files from this thread

File Name File Size   Posted by Date  
nginx.conf 1.1 KB open | download Vishwas Bm 10/27/2022 Read message
November 04, 2022 04:02AM

Probably an issue associated with backlog and/or timewait. If the
backlog queue or the timewait bucket is full, the new connection request
will be dropped by tcp, before Nginx even accepting the connection, so you
can't see error log in Nginx.

To increase the backlog queue, you can increase the system tcp
configuration `net.core.somaxconn`, `net.ipv4.tcp_max_syn_backlog` and the
nginx config `listen backlog=xxxx`. The former is the system-level limit,
the latter is the process-level limit.

To avoid timewait bucket overflow, you can increase the system tcp
configuration `net.ipv4.tcp_max_tw_buckets` or enable the

In addition, enlarging the ip/port range of the client side may also be

BTW, you can use `ss` or `netstat` to observe the backlog of the listening
socket which corresponds to the `Send-Q` and `Recv-Q` fields of the output.
The kernel log can also gives you some information. If I remember
correctly, there is a kernel log when timewait bucket overflow occurs.

Hope it helps.

Reinis Rozitis <> 于2022年10月27日周四 19:46写道:

> > We are using the hey ( tool to pump 50k
> requests per second and are seeing only 40k requests being received on the
> backend application side.
> > Any other tcp configuration that needs to be tuned ?
> I am not familiar with the tool but per documentation it should have some
> sort of error status report for the failed requests What it is for the 10k
> "missing" requests?
> Are they "missing" (already) on nginx or just on the proxied backend(s)?
> (in the provided nginx configuration I don't see any access/error log
> configuration - you could enable both to see if you actually get those 50k
> requests to nginx).
> Are you testing from a single client (same server) or multiple?
> Do you use keepalive or new connection per request (in the case of later
> might come close to the ephemeral port limit (~65k) depending on if
> tcp_tw_reuse is or isn’t configured)?
> Have you tried with other tools like 'ab', 'httperf' or 'siege' to see if
> you get the same results/problems?
> rr
> _______________________________________________
> nginx mailing list --
> To unsubscribe send an email to
nginx mailing list --
To unsubscribe send an email to
Subject Author Posted

performance guide for nginx L4 stream Attachments

Vishwas Bm October 27, 2022 06:20AM

RE: performance guide for nginx L4 stream

Reinis Rozitis October 27, 2022 07:46AM

Re: performance guide for nginx L4 stream

solomon November 04, 2022 04:02AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready