7

sometimes there is a bug (~30%):

Failed to connect to: IP:2333: Read timed out after reading 0 bytes, waited for 0.000000 seconds

  • Web server Apache/2.2.16
  • PHP version PHP 5.3.3-7+squeeze15
  • PHP extension mongo/1.4.0
  • MongoDB version 2.2.3

In all cases. What is this?

1 Answer 1

1

I had the exact same bug. The solution is to set a timeout for your requests.

  • You can do a $cursor->timeout(-1); on each of your cursors.

  • Or simply add MongoCursor::$timeout = -1; in your index/connection file.

-1 is to set an infinite timeout. You can also put a value in milliseconds if you don't want infinite.

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

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.