-
Notifications
You must be signed in to change notification settings - Fork 35
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
crochet doesn’t work with uWSGI #78
Comments
|
|
I found this:
So see if |
Or, I suppose, if the first time you call |
I had |
Before going down that route, can you provide a minimal reproducer? |
Oh and quitting is a problem too:
|
FYI |
I made an example project: https://github.com/hynek/wsgi_test I use
Which is a bummer, because I need that option for the Sybase driver. The emperor mode is a whole different beast entirely because it uses PasteDeploy which I’m too dumb to quickly get an example together, HTH anyway. Unfortunately I wasn’t able to reproduce the hangs either, but baby steps. |
That parts looks like what #69; the logic for detecting main thread is quite iffy. |
Thanks for the example, I'll take a look. |
I opened an issue (#79) for the MainThread thing. I'll leave this issue to cover anything else uncovered by testing your example. |
exarkun suggested |
I'm looking into a solution for this issue. Running in uwsgi the thread names (at the time of this error) are: What do you think about allowing for the name of the main thread (or some prefix) to be set from the environment? So the watchdog would be able to use the worker thread to register shutdown? I also wonder if this registration could happen as part of |
That's one possibility. Another is covered by #79, which has my current thoughts on how this could be solved - getting rid of the wait-for-thread shutdown mechanism altogether and just rely on Python to shut things down. A workaround until I work this out is to just rename the appropriate thread "MainThread" (just a simple |
I'm not sure what other side-effect there might be if I go renaming the uwsgi threads, so I'd rather avoid that. I'll submit a PR with a small refactor to allow a thread selector to be passed to |
Rather than a thread selector, how about allowing passing a function to |
That sounds good, and should be easier to implement as well. |
Cool, I'd love a PR if you've got the time. |
I have verified that both normal and lazy-app mode in example provided by @hynek work with latest Crochet |
I tried to use crochet with uWSGI and a Pyramid application and a lot of fail has been had.
A few things make it crash with http://glui.me/?d=is6368qf71cqb25/2015-02-18%20at%2013.02.png/ right away like
lazy-apps
, others make it hang (like starting multiple processes).That makes me kind of sad, because I really like uWSGI. :-/ Works like a charm with gunicorn so far.
The text was updated successfully, but these errors were encountered: