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

uwsgi_run_command() attempts to close enormous number of sockets, causing 100% CPU #2698

Open
paulej opened this issue Jan 3, 2025 · 0 comments

Comments

@paulej
Copy link

paulej commented Jan 3, 2025

I have an application that starts via docker-compose. It had been working well for months, but I updated to Fedora 41 and it started causing the CPU to peg to 100%.

I tracked the problem down to this line of code: https://github.com/unbit/uwsgi/blob/master/core/utils.c#L2542.

The value used there was 1073741816. I tried to find where it was being assigned, and it appears to be here: https://github.com/unbit/uwsgi/blob/master/core/uwsgi.c#L2776.

I was able to solve the issue by adding a constraint to the docker-compose file as follows:

    ulimits:                                                                                                            
      nofile:                                                                                                           
        soft: 1024                                                                                                      
        hard: 2048

That seemed to tame things. I don't know what docker used to allow as resource limits, but I guess they are enormous now. I did not change any configuration regarding docker. So, whatever change just happened with the Fedora 41 upgrade.

While this might be a docker issue (or a Fedora issue), I think it's probably best to not attempt to close 1073741816 sockets, even if the OS says you can.

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

1 participant