1

I run an Apache 2.2.22-13 with pecl module "mongo 1.4.4". It connects to a MongoDB 2.4.6 sharded cluster.

When a stepDown occurs, the mongo module seems to stay on the mongod node which was the primary and says: "PHP Fatal error: Uncaught exception 'MongoCursorException' with message 'node1.mongodb.cluster:27017: Remote server has closed the connection' ...

To establish the connection, I tried the 2 following ways:

$m = new MongoClient('mongodb://mongod0.mongodb.cluster, mongod1.mongodb.cluster, mongod2.mongodb.cluster, mongod3.mongodb.cluster', array("replicaSet" => "myrs"));

and

$m = new MongoClient('mongodb://mongos.mongodb.cluster', array("replicaSet" => "myrs"));

After a stepDown, the two ways give the same error message.

With the first connection string, restarting Apache is enough to get things back on rails. With the last one, restarting doesn't: I don't get any error message anymore but the data that should come from MongoDB is still missing.

Thanks in advance,

Greg.

2
  • did you get any solution? Feb 23, 2014 at 4:03
  • no, I didn't get any solution
    – Icu
    Jul 2, 2014 at 8:11

1 Answer 1

0

I upgraded the mongo pecl module from 1.4.5 to 1.5.8. This problem is fixed.

1
  • I'm having the same issue using v 1.6.16 . Apr 27, 2021 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .