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

Not working with gunicorn + gevent workers #13

Closed
anshulk opened this issue Jul 24, 2017 · 4 comments
Closed

Not working with gunicorn + gevent workers #13

anshulk opened this issue Jul 24, 2017 · 4 comments

Comments

@anshulk
Copy link

anshulk commented Jul 24, 2017

I'm trying to use the threading_timeoutable decorator on a function.
It works if I run the script directly, but doesn't work when running via gunicorn using gevent workers.

Any ideas on making it work?

@glenfant
Copy link
Owner

glenfant commented Aug 6, 2017

Hi @anshulk , the theading part of stopit is designed for standard CPython threading inners.
I'm not familiar with gevent plumbing, but I suspect you should tailor the async_raise function to the inners of gunicorn/gevent. AFAIK gevent monkey patches lots of Python stdlib low level APIs.

@glenfant
Copy link
Owner

Hi @anshulk , I have still no fix for this issue. As long as there's no PR that fixes this, I'll mention this in a "known issues" section of the doc, and close this.

glenfant added a commit that referenced this issue Dec 31, 2017
@jrial
Copy link

jrial commented Jul 17, 2018

This also seems to affect gunicorn's sync workers, not just gevent workers.
I know, this is closed as wontfix; just leaving that here in case someone else comes along and thinks it only applies to gevent workers, based on the title.

@glenfant
Copy link
Owner

Thanks @jrial , I'll mention this too.
Any PR that fixes this bug or test case that shows it is welcome.

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

3 participants