You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The exporter starts a server on listen-port using http.ListenAndServe. However, there is no attempt at a graceful shutdown when a SIGTERM is received (see this post for some ideas of how a SIGTERM can be reacted with a server.Shutdown())
We have an issue in our project where we use this project (mysqlrouter_exporter). As the trace in the issue indicates, we run into bind address in use error intermittently when we start exporter, stop it and then restart it. Further digging revealed that when we stop exporter, sometimes, due to an ungraceful shutdown, we have connections in TIME_WAIT:
Issue
The exporter starts a server on
listen-port
using http.ListenAndServe. However, there is no attempt at a graceful shutdown when a SIGTERM is received (see this post for some ideas of how a SIGTERM can be reacted with aserver.Shutdown()
)We have an issue in our project where we use this project (mysqlrouter_exporter). As the trace in the issue indicates, we run into
bind address in use
error intermittently when we start exporter, stop it and then restart it. Further digging revealed that when we stop exporter, sometimes, due to an ungraceful shutdown, we have connections inTIME_WAIT
:It is exactly under these conditions that we run into the
bind address in use
error. When theSuggested Solution
To gracefully shutdown the server as indicated by the above linked post when a SIGTERM is received
Potential followups
I will attempt to create a PR with a proposed solution for this issue
The text was updated successfully, but these errors were encountered: