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

celery multi exits with an exception when workers use gevent #1717

Closed
amckinley opened this issue Dec 5, 2013 · 0 comments
Closed

celery multi exits with an exception when workers use gevent #1717

amckinley opened this issue Dec 5, 2013 · 0 comments

Comments

@amckinley
Copy link

When invoking celery multi with workers that use gevent, the process exits with an exit status of 0, but prints an exception that gets thrown from the threading module:

(specter)austin@ubuntu:~/src/specter/specter$ celery multi start 2 -P gevent -I specter.tasks -c 100 -E --loglevel=debug
celery multi v3.1.6 (Cipater)
> Starting nodes...
        > celery1@ubuntu: OK
        > celery2@ubuntu: OK
Exception KeyError: KeyError(14025744,) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
(specter)austin@ubuntu:~/src/specter/specter$

After discussing on IRC, the speculation is that celery multi is detecting the -P option and invoking gevent.monkey_patch() before forking the workers, which triggers the exception. See this link for details: http://stackoverflow.com/questions/8774958/keyerror-in-module-threading-after-a-successful-py-test-run

@ask ask closed this as completed in 0bd2615 Dec 9, 2013
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