-
Notifications
You must be signed in to change notification settings - Fork 794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exceptions not handled in server thread #983
Comments
I did some more investigation and found that these exceptions are actually handled and just printed in a way (with traceback) that makes one think they had not been handled. They are printed in the In fact, I found that at some level (below the prometheus-client) a retry must happen, because the exporter happily responds to a web browser when I inject the exception into So I guess the questions are:
|
We are occasionally getting an
ssl.SSLEOFError
when using the prometheus client with HTTPS (as of the new version 0.19.0). That error is raised in the server thread and because it is not handled there, the entire process dies:I verified that this exception is not raised within
start_http_server()
so it must be happening in the server thread.The goal would be that the exception raised in the server thread causes the server thread to terminate and the main thread has some means to get to the exception raised in the server thread. The solution would need to work for both HTTP and HTTPS.
There seem to be different techniques on how that can be achieved:
This would probably require that the
start_http_server()
function returns the thread object (see issue #883)The text was updated successfully, but these errors were encountered: