KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I know pymongo is thread safe and has an inbuilt connection pool. In a web app that I am working on, I am creating a new connection instance on every request. My understanding is that since pymongo manages the connection pool, it isn't wrong approach to create a new connection on each request, as at the end of the request the connection instance will be reclaimed and will be available on subsequent requests. Am I correct here, or should I just create a single instance to use across multiple requests?
Tags (comma-separated)
Save Edits
Cancel