mailru / graphite-nginx-module

An nginx module for collecting stats into Graphite
135 stars 34 forks source link

cannot close connection when it was never opened #40

Closed arnej27959 closed 3 years ago

arnej27959 commented 3 years ago

We have seen some nginx coredumps in connection overload situations lately. We don't want to be in connection overload of course, but we looked at the core dump and found it was caused by the graphite module - when it can't open a connection it jumps to "failed" label where it tries to close the connection and promptly crashes following a null pointer. This is a possible fix; another possible fix would be to add if (gmcf->connection != NULL) in the "failed:" section around ngx_close_connection().