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

v0.13.0 is generating a large CPU load and starving the nginx process during renewals #220

Closed
mklauber opened this issue Feb 21, 2020 · 4 comments

Comments

@mklauber
Copy link
Contributor

mklauber commented Feb 21, 2020

Hi, I'm working with a large system with 10's to 100's of thousands of domains, and something between version 0.12.0 and 0.13.0 is resulting in a large amount of CPU churn as we try to renew certificates. This appears to completely stop openresty from serving requests.

My guess is that this is related to the shuffle code added into the v.013.0 release, but I can't 100% confirm that. Can anyone provide advice on confirming or addressing that, or if there's something else people think I should look into?

@mklauber
Copy link
Contributor Author

mklauber commented Feb 21, 2020

To provide additional information, about once every 24 hours, a large number (30-40) of dehydrated processes would be started simultaneously, and the ability of our server to process requests would become degraded, eventually resulting in logs grinding to a complete halt. A restart of openresty would fix the issue, but also stop the renewals.

@mklauber
Copy link
Contributor Author

I can say the issue is coming from dehydrated. Each dehydrated process appears to enter a state where it sits, waiting, consuming 15-20% cpu. Advice is welcome if you have any, but I'll also understand if you want to close this and point me upstream to https://github.com/dehydrated-io/dehydrated

@mklauber
Copy link
Contributor Author

mklauber commented Mar 9, 2020

Alright, I think we actually tracked this down to being on an old version of openresty that had a deadlock bug in it: openresty/lua-nginx-module#1207 (comment) Closing this

@mklauber mklauber closed this as completed Mar 9, 2020
GUI added a commit that referenced this issue Mar 23, 2020
…ocks.

These are loaded by default in OpenResty 1.15.8.1+, but this will ensure
this library is loaded in older versions.

openresty/lua-nginx-module#1207 (comment)
#43
#220
@GUI
Copy link
Collaborator

GUI commented Mar 23, 2020

@mklauber: Sorry for the issue and lack of response, but thanks for bringing this up. I've updated the README to better indicate OpenResty 1.15.8.1+ should fix these unfortunate deadlock issues that it seems like some users run into. But I've also tweaked lua-resty-auto-ssl to automatically require the resty.core FFI library, which should hopefully fix this issue in older OpenResty versions in the next lua-resty-auto-ssl release. So thanks for connecting the dots on all this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants