Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
_SSLErrorHandshakeTimeout exception crashed whole web server #1295
A Flask application is served by gevent WSGIServer with ssl certificate trusted by an inhouse CA.
Sorry if this not the place to submit this, but I could'nt find any relevant case after a long googling.
Any help would be much appreciated
This appears to be happening during interpreter shutdown. (OR your application has heavily customized gevent's hub.)
We get here to handle an exception deemed to be not an application error. By default that's
This means that
The hub died badly due to previous errors. At the top level, I would tend to expect the process to exit at that point. If that's not the top level, well, with the hub dead, nothing much is going to happen.
It's possible that a timeout error (any error happening in a non-hub greenlet), happening at the same time as interpreter shutdown, could lead to such a situation. I would expect such a situation to be rare and difficult to reproduce, though.
If that's the case, in this particular scenario there are things we can do to try to avoid using interpreter state during shutdown, but that's not always easy.