Investigate issues with gevent.monkey.patch_all()
See original GitHub issueIs your feature request related to a problem? Please describe.
Users on an older version of gevent (1.5.0) reported that running gevent.monkey.patch_all()
breaks workflow asyncio.
Describe the solution you’d like
- Replicate the error on that gevent version (a simple workflow is probably fine)
- Upgrade gevent to see if it still occurs
- If not, essentially bisect to find offending version minimum and maybe document in README
- If so, find workaround and document in README
Issue Analytics
- State:
- Created a year ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Gevent monkey.patch_all() hangs my application · Issue #1812
I am guessing that this is because gevent has not monkey patched threads. Please correct me if I'm wrong. Concern: As of now,...
Read more >gevent.monkey – Make the standard library cooperative
The primary interface to this is the patch_all() function, which performs all the available patches. It accepts arguments to limit the patching to...
Read more >Seeing MonkeyPatching error while running newrelic-admin ...
I am running in to MonkeyPatching issue. Error: ... Found problems running newrelic-admin with python 3.6, gevent and gunicorn.
Read more >Gevent monkey patching - OverflowError - Stack Overflow
I tried to run my Flask project with gevent on Python3.7 on Raspberry Pi with gevent.monkey.patch_all() on the first line.
Read more >What is gevent?
libev attempts to resolve some of these problems by not using global variables and use a ... To patch all default modules, call...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the context. I am planning on testing our gevent setup with Temporal. I will report back the results w/gevent version once I have done so
Completely agree, but there was something w/ the default event loop policy on some platform I think was causing me problems. But I forget what and I didn’t document it, so will definitely try to move back to all public API.
We really have to keep our custom event loop. It’s the underpinning of what makes workflows work well.
Maybe we can have a similar monkey patch that overrides gevent for the life of the run_once and then puts it back after. I’ll have to check gevent, but surely we’re not the first that have wanted to do advanced asyncio loop management in a gevent-enabled process. I’ll have to dig into what they really do. I only need a short synchronous window to own the loop on a thread run.