Is anyone using MongoDB with web2py? How do you 'share' connection
object in your app when using pymongo?

If I put the code below into db.py, each request causes the new
connection opened to MongoDB what mean that after 500 requests to my
app, there are 500 separate connections I can see on MongoDB console.
>>> from pymongo import Connection
>>> connection = Connection()

Where to put the connection code to have some pooling mechanism so
connection is shared among requests?

David

Reply via email to