monkey.patch_all(thread=False)
Remove "thread=False".
This makes thread hanging.
Refer to usage of pymongo + gevent on below site
http://api.mongodb.com/python/current/examples/gevent.html
https://stackoverflow.com/questions/7166998/pymongo-gevent-throw-me-a-banana-and-just-monkey-patch
They are telling,
"By default, PyMongo uses threads to discover and monitor your servers’ topology (see Health Monitoring). If you execute monkey.patch_all()
when your application first begins, PyMongo automatically uses greenlets instead of threads."
'python' 카테고리의 다른 글
pytz localize vs normalize (0) | 2018.02.26 |
---|---|
flask save session error (0) | 2017.12.05 |
gevent monkey patch all, code location (0) | 2017.09.14 |
flask with gevent monkey patch all (0) | 2017.07.26 |
flask gevent spawn use a lot of memory (0) | 2017.04.05 |