PHP MongoDB errors when using auto failover

I have the most difficult time to figure this out. I have a set of replicas of 2 servers with one arbiter working next to the current primary.

When connecting or issuing requests, I get intermittent errors that vary from any of the following:

  • Could not determine master.
  • Failed to connect to [put host here].
  • Exclusions with broken channels.
  • MongoCursorExceptions.

They seem to occur more often the longer the servers. After some time, the connections cannot be made, and I get the following error when trying to enter the mongo shell:

MongoDB shell version: 1.8.1
connecting to: test
Wed May 11 16:36:50 MessagingPort recv() errno:104 Connection reset by peer 127.0.0.1:27017
Wed May 11 16:36:50 SocketException: remote:  error: 9001 socket exception [1] 
Wed May 11 16:36:50 DBClientCursor::init call() failed
exception: DBClientBase::findOne: transport error: 127.0.0.1 query: { whatsmyuri: 1 }

(BTW with a slave (-vvvv) protocol, socket exception 9001 seems to come up with every request made.)

mongo, , .

, , . - , . . : (, replicaSet , , PHP - , , , , , .

, PHP, , . , . , . , . , .

- ?

: - 2 - - Apache/PHP - MongoDB Replica-Set span - - - - MongoDB 1.8.1 - PHP- 1.1.4 - PHP 5.3.3 - Apache 2.2.17 - RedHat 5.5 ()

+3
1

MongoDB.

.

-2

All Articles