TCP reset (RST) from upstream server being delayed by upstream socket receive buffer
nginx-forum at forum.nginx.org
Fri Jul 30 10:22:45 UTC 2021
I'm runnung nginx/1.18.0 as a tls reverse proxy to a local upstream http
server on Ubuntu 20..
In certain cases the upstream server is resetting the connection with the
intention to close the downstream connection as soon as possible without
delivering remaining data in the socket and proxy buffers.
This seems to work as expected when running nginx on Windows with similar
socket buffer sizes.
On Ubuntu though it looks like nginx is trying to read and deliver the
in the upstream receive buffer before actually returning the connection
error from the recv call.
Depending on the network limitation and fill of the receive buffer this can
take 20 seconds and more.
On Windows nginx recv is returning the connection reset almost immediately.
Is this rather an application or OR related difference/issue?
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,292116,292116#msg-292116
More information about the nginx