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 requires 'enable-threads = true' when 'use_queues' #189

Open
jimdigriz opened this issue Jun 23, 2023 · 1 comment
Open

uwsgi requires 'enable-threads = true' when 'use_queues' #189

jimdigriz opened this issue Jun 23, 2023 · 1 comment

Comments

@jimdigriz
Copy link

Though to a varying degree an obvious statement, as uWSGI disables Python threads by default, if use_queues is enabled (the default) you are not going to see much in the way of logs in Cloudwatch.

It would be helpful, maybe near to your AWS Lambda caveat, that for uWSGI this is mentioned and that the user should add enable-threads = true to their uWSGI INI file.

Better still would be for when threading is not available to refuse to start when use_queues is enabled, or print a large warning to STDERR that use_queues was automatically disabled.

Alas, I am not going to get that hour of my life back.

Thanks for the marvellous work otherwise.

@kislyuk
Copy link
Owner

kislyuk commented Jun 25, 2023

Thanks for pointing this out, it's not obvious at all. This is one unfortunate consequence of uwsgi's design decisions - because of hacks like this, other packages are left to pick up the pieces. Disabling use_queues makes watchtower far less useful, and is not recommended in production. The code snippet that you linked is generally objectionable - packages should not be forced to delve into the implementation details of unrelated application servers to figure out whether they broke some fundamental runtime functionality by selectively hacking it out. With that said, you're not the first person surprised by this issue, and I think many watchtower users gave up trying to figure out the issue with the default uwsgi configuration, so the benefits of including a check like the one in raven-python outweigh the drawbacks. I'll look into adding either that check or a blanket warning when using uwsgi.

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