I am using OpenResty and lua-resty-auto-ssl to generate SSL on the fly. OpenResty is acting as a reverse proxy to our Node.js app. It works great, but sometimes it just crashes with the following errors and never recovers.
issue_cert(): auto-ssl: failed to obtain lock: timeout, context: ssl_certificate_by_lua*,
[crit] 30999#0: accept4() failed (24: Too many open files)
I have to manually kill the process and restart to make it work. What could be the reason?
OpenResty version: 184.108.40.206
Single core CPU with 3GB RAM
lua_shared_dict auto_ssl: 1024m;
lua_shared_dict auto_ssl_settings: 64k;
Also, it appears that this error occurs whenever there is an SSL generation error for specific domains. This issue might even be related to this -- I am not entirely sure though. Any help will be highly appreciated. :)
Further investigation revealed that this happens whenever the certification generation is not able to complete for any reason. For example, when any domain is behind Cloudflare, the SSL generation fails and OpenResty becomes unresponsive.
The text was updated successfully, but these errors were encountered: