7

We're occasionally getting the following error when doing queries:

OperationFailure: database error: error querying server

There is no specific query causing this, and when repeating the process things work. Has anybody else seen this error?

Our setup is a cluster of Ubuntu VMs on Amazon EC2, we're using Python 2.7.3 and pymongo v2.3. We're also using Mongoengine, however we still get this exception from non-Mongoengine code.

2 Answers 2

4

To those discovering this question:

We were never able to fully diagnose the problem with this, our hunch is that the database connection tends to fail every once in a while for whatever reason. From our research into distributed computing, this is a common problem and needs to be handled explicitly.

In the end, we adapted our system to become robust to DB connection failures by catching OperationFailure exceptions along with similar ones and re-establishing the database connection. This resolved the problem along with a number of similar ones we were having.

Sign up to request clarification or add additional context in comments.

Comments

0

Seems the query failed on the server - to diagnose you'd need to check the server logs.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.