Python: 100 connections to MongoDB cause a high cpu usage, Why? -


mongoengine support connect multi mongodb databases.

i write simple code make 100 connections mongodb python script

enter image description here

but, noticed in top , python cause high cpu usage

enter image description here

my cpu:

enter image description here

why ?

and if wanna connect multi mongodb database in python, how correctly ?

i wrote equivalent script using pymongo, , db cpu usage stayed @ 0 300+ connections open.

from pymongo import mongoclient  x in xrange(100):     mongoclient() 

try out , see if problem persists? believe it's officially supported python package mongodb.


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

php - Improving script execution time -

How to provide Authorization & Authentication using Asp.net, C#? -