Skip to content
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

Couldn't obtain lock and too many open files error #178

panda-sandeep opened this issue May 24, 2019 · 0 comments

Couldn't obtain lock and too many open files error #178

panda-sandeep opened this issue May 24, 2019 · 0 comments


Copy link

@panda-sandeep panda-sandeep commented May 24, 2019

Hi everyone!

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?

Some Info

OpenResty version:
lua-resty-auto-ssl: 0.12.0-1
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.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant