Welcome! Log In Create A New Profile


reflect upstream errors towards downstream

Posted by shauli 
reflect upstream errors towards downstream
January 24, 2022 04:38PM
When Nginx gets a socket error/timeout from the upstream server, it sends a 502 http error back to the client. I would like to change this default behavior: if Nginx gets a socket error from the upstream, then I'd like it to break the connection towards the client (instead of sending a 502). The reason this is helpful is because some clients know to retry a request when they get a socket error, but they give up when getting the 502. Any ideas how to achieve this?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 177
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