I have a django application using mongoengine running on gunicorn with working gevents. Under load, the number of Mongo compounds rises to about 3 thousand and never returns. Even after the load test is completed, the number of mongo joints remains constant. Restarting machine guns releases connections.
Package versions
gunicorn==0.17.4 mongoengine==0.8.7 pymongo==2.7
mongodb 2.6.0
I have mongoengine connection settings in an environment-specific django settings file:
MONGO_DATABASES = { 'default': { 'DB': '****', 'HOST': ***********:27017', 'PORT': 27017 } } from gevent import monkey monkey.patch_all() from mongoengine import connect connect(MONGO_DATABASES['default']['DB'], host=MONGO_DATABASES['default']['HOST'], port=MONGO_DATABASES['default']['PORT'], max_pool_size=100)
Is there something I need to do to make sure that unused connections will eventually be released?
Thanks,
Arc
python django mongodb pymongo mongoengine
Douglas hall
source share