Skip to content
Proxy around MongoDB connection that automatically handles AutoReconnect-exceptions.
Find file
Latest commit df418c0 Aug 24, 2015 @arngarden Merge pull request #18 from quantopian/log-timed-out-query-spec
Log query spec on operational failures.


MongoDBProxy is used to create a proxy around a MongoDB-connection in order to automatically handle AutoReconnect-exceptions. You use MongoDBProxy in the same way you would an ordinary MongoDB-connection but don't need to worry about handling AutoReconnects by yourself.


import pymongo

import mongo_proxy

safe_conn = mongo_proxy.MongoProxy(pymongo.MongoReplicaSetClient(replicaSet='blog_rs')


See here for more details:


Jonathan Kamens (

Michael Cetrulo (

Richard Frank (

David Lindquist (

Something went wrong with that request. Please try again.