Welcome! Log In Create A New Profile

Advanced

Peer closed connection in SSL handshake marking upstream as failed

June 21, 2017 11:52AM
We're seeing an 502 bad gateway responses to client on an nginx load
balanced upstream due to "no live upstreams".

The upstream in question has 2 servers defined with default settings
running over https (proxy_pass https://myupstream).

When this happens we see "no live upstreams while connecting to
upstream" in the nginx error log and just prior to this:
"peer closed connection in SSL handshake (54: Connection reset by peer)
while SSL handshaking to upstream".

We currently believe that the client closing the connection is causing
the upstream to have a failure counted against it.

With the defaults of max_fails=1 and fail_timeout=10 it only takes two
such closes within a 10 second window to take down all upstream nodes
resulting in the "no live upstreams" and hence all subsequent
connections for the next 10 seconds fail instantly with 502 bad gateway.

Does this explanation seem plausible, is this a bug in nginx?

We're currently testing with max_fails=10 as a potential workaround.

Regards
Steve





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

Peer closed connection in SSL handshake marking upstream as failed

steveh June 21, 2017 11:52AM

Re: Peer closed connection in SSL handshake marking upstream as failed

Maxim Dounin June 21, 2017 12:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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