We seem to be seeing a memory leak when reloading our servers (SIGHUP). Admittedly, we have a lot of custom code, and the leak is probably there. Still, some investigation suggestion that the SSL_CTX, created in ngx_http_lua_module.c as part of the ngx_http_lua_merge_loc_conf flow, is never freed. The problem was particularly pronounced when were loading a large pem file via lua_ssl_trusted_certificate. We've removed this directive for now, but there's still a leak and it still appears to originate from the SSL context.
I tried to figure out how ngx_http_proxy_module handles this, and it sets `ngx_ssl_cleanup_ctx` as a handler, which ultimately calls SSL_CTX_free.
Thanks,
Karl