Pymongo: "OperationFailure: Database Error: Error Request Server"

We sometimes get the following error when executing queries:

OperationFailure: database error: error querying server 

There is no specific request causing this, and when the process repeats, everything works. Has anyone else seen this error?

Our setup is a Ubuntu VM cluster on Amazon EC2, we use Python 2.7.3 and pymongo v2.3. We also use Mongoengine, however we still get this exception from code other than Mongoengine.

+6
source share
2 answers

To those who open this question:

We could never fully diagnose the problem with this, our hunch is that connecting to the database tends to fail every once in a while for any reason. Of our research in distributed computing, this is a common problem and needs to be addressed explicitly.

In the end, we adapted our system to become reliable for database connection failures, catching OperationFailure exceptions with similar ones and restoring the database connection. This solved the problem along with a number of people like us.

+2
source

It seems that the request was unsuccessful on the server - for diagnostics you will need to check the server logs.

0
source

All Articles