I am seeing a very strange bug using the PHP driver. I am running a three member replica set, each member is running v2.2.3.
If I take a member in the replica set offline, sometime the PHP client fails to connect with:
No candidate servers found
The only way to fix it, is to restart the php-fpm worker, and magically it goes back to normal and connects. Here is my PHP connection code:
try {
$client = new MongoClient("mongodb://username-here:password-here@mongodb1.local.mydomain.com,mongodb2.local.mydomain.com,mongodb3.local.mydomain.com/my-database", array("timeout" => 10000, "replicaSet" => "rs-san-jose");
I am seeing a very strange bug using the PHP driver. I am running a three member replica set, each member is running v2.2.3.
If I take a member in the replica set offline, sometime the PHP client fails to connect with:
No candidate servers found
The only way to fix it, is to restart the php-fpm worker, and magically it goes back to normal and connects. Here is my PHP connection code:
try {
$client = new MongoClient("mongodb://username-here:password-here@mongodb1.local.mydomain.com,mongodb2.local.mydomain.com,mongodb3.local.mydomain.com/my-database", array("timeout" => 10000, "replicaSet" => "rs-san-jose");
I am seeing a very strange bug using the PHP driver. I am running a three member replica set, each member is running v2.2.3.
If I take a member in the replica set offline, sometime the PHP client fails to connect with:
No candidate servers found
The only way to fix it, is to restart the php-fpm worker, and magically it goes back to normal and connects. Here is my PHP connection code:
try {
$client = new MongoClient("mongodb://username-here:password-here@mongodb1.local.mydomain.com,mongodb2.local.mydomain.com,mongodb3.local.mydomain.com/my-database", array("timeout" => 10000, "replicaSet" => "rs-san-jose");
I am seeing a very strange bug using the PHP driver. I am running a three member replica set, each member is running v2.2.3.
If I take a member in the replica set offline, sometime the PHP client fails to connect with:
No candidate servers found
The only way to fix it, is to restart the php-fpm worker, and magically it goes back to normal and connects. Here is my PHP connection code:
try {
$client = new MongoClient("mongodb://username-here:password-here@mongodb1.local.mydomain.com,mongodb2.local.mydomain.com,mongodb3.local.mydomain.com/my-database", array("timeout" => 10000, "replicaSet" => "rs-san-jose");
I am seeing a very strange bug using the PHP driver. I am running a three member replica set, each member is running v2.2.3.
If I take a member in the replica set offline, sometime the PHP client fails to connect with:
No candidate servers found
The only way to fix it, is to restart the php-fpm worker, and magically it goes back to normal and connects. Here is my PHP connection code:
try {
$client = new MongoClient("mongodb://username-here:password-here@mongodb1.local.mydomain.com,mongodb2.local.mydomain.com,mongodb3.local.mydomain.com/my-database", array("timeout" => 10000, "replicaSet" => "rs-san-jose");
I am seeing a very strange bug using the PHP driver. I am running a three member replica set, each member is running v2.2.3.
If I take a member in the replica set offline, sometime the PHP client fails to connect with:
No candidate servers found
The only way to fix it, is to restart the php-fpm worker, and magically it goes back to normal and connects. Here is my PHP connection code:
try {
$client = new MongoClient("mongodb://username-here:password-here@mongodb1.local.mydomain.com,mongodb2.local.mydomain.com,mongodb3.local.mydomain.com/my-database", array("timeout" => 10000, "replicaSet" => "rs-san-jose");
I am seeing a very strange bug using the PHP driver. I am running a three member replica set, each member is running v2.2.3.
If I take a member in the replica set offline, sometime the PHP client fails to connect with:
No candidate servers found
The only way to fix it, is to restart the php-fpm worker, and magically it goes back to normal and connects. Here is my PHP connection code:
try {
$client = new MongoClient("mongodb://username-here:password-here@mongodb1.local.mydomain.com,mongodb2.local.mydomain.com,mongodb3.local.mydomain.com/my-database", array("timeout" => 10000, "replicaSet" => "rs-san-jose");
>> MongoClient("mongodb://username-here:password-here@mongodb1.local.mydomain.com,mongodb2.local.mydomain.com,mongodb3.local.mydomain.com/my-database",
{ "set" : "drupalSet",
"date" : { "$date" : "Fri Sep 27 12:12:04 2013" },
"myState" : 2,
"syncingTo" : "mongodb03.dcluster:27017",
"members" : [
{ "_id" : 0,
"name" : "mongodb01.dcluster:27017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 29778,
"optime" : { "$timestamp" : { "t" : 1380276683, "i" : 3 } },
"optimeDate" : { "$date" : "Fri Sep 27 12:11:23 2013" },
"errmsg" : "syncing to: mongodb03.dcluster:27017",
"self" : true },
{ "_id" : 1,
"name" : "mongodb02.dcluster:27017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 10,
"optime" : { "$timestamp" : { "t" : 1380276683, "i" : 3 } },
"optimeDate" : { "$date" : "Fri Sep 27 12:11:23 2013" },
"lastHeartbeat" : { "$date" : "Fri Sep 27 12:12:02 2013" },
"lastHeartbeatRecv" : { "$date" : "Fri Sep 27 12:12:02 2013" },
"pingMs" : 0,
"lastHeartbeatMessage" : "syncing to: mongodb01.dcluster:27017",
"syncingTo" : "mongodb01.dcluster:27017" },
{ "_id" : 2,
"name" : "mongodb03.dcluster:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 94,
"optime" : { "$timestamp" : { "t" : 1380276683, "i" : 3 } },
"optimeDate" : { "$date" : "Fri Sep 27 12:11:23 2013" },
"lastHeartbeat" : { "$date" : "Fri Sep 27 12:12:02 2013" },
"lastHeartbeatRecv" : { "$date" : "Fri Sep 27 12:12:02 2013" },
"pingMs" : 0,
"syncingTo" : "mongodb01.dcluster:27017" } ],
"ok" : 1 }{ "set" : "drupalSet",
"date" : { "$date" : "Fri Sep 27 15:59:11 2013" },
"myState" : 2,
"syncingTo" : "mongodb03.dcluster:27017",
"members" : [
{ "_id" : 0,
"name" : "mongodb01.dcluster:27017",
"health" : 0,
"state" : 8,
"stateStr" : "(not reachable/healthy)",
"uptime" : 0,
"optime" : { "$timestamp" : { "t" : 1380285910, "i" : 3 } },
"optimeDate" : { "$date" : "Fri Sep 27 14:45:10 2013" },
"lastHeartbeat" : { "$date" : "Fri Sep 27 15:59:11 2013" },
"lastHeartbeatRecv" : { "$date" : "Fri Sep 27 14:46:39 2013" },
"pingMs" : 0 },
{ "_id" : 1,
"name" : "mongodb02.dcluster:27017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 4365,
"optime" : { "$timestamp" : { "t" : 1380285910, "i" : 3 } },
"optimeDate" : { "$date" : "Fri Sep 27 14:45:10 2013" },
"self" : true },
{ "_id" : 2,
"name" : "mongodb03.dcluster:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 4365,
"optime" : { "$timestamp" : { "t" : 1380285910, "i" : 3 } },
"optimeDate" : { "$date" : "Fri Sep 27 14:45:10 2013" },
"lastHeartbeat" : { "$date" : "Fri Sep 27 15:59:11 2013" },
"lastHeartbeatRecv" : { "$date" : "Fri Sep 27 15:59:09 2013" },
"pingMs" : 0,
"syncingTo" : "mongodb01.dcluster:27017" } ],
"ok" : 1 }PHP:
2013/09/27 15:58:47 [error] 2089#0: *133 FastCGI sent in stderr: "PHP message: PHP Notice: CON INFO: mongo_get_read_write_connection: finding a REPLSET connection (read) in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: CON FINE: found connection mongodb01.dcluster:27017;drupalSet;.;2246 (looking for mongodb01.dcluster:27017;drupalSet;.;2246) in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: CON FINE: is_ping: skipping: last ran at 1380290327, now: 1380290327, time left: 1 in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: CON WARN: Couldn't connect to 'mongodb01.dcluster:27017': Previous connection attempts failed, server blacklisted in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: CON FINE: found connection mongodb02.dcluster:27017;drupalSet;.;2246 (looking for mongodb02.dcluster:27017;drupalSet;.;2246) in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: CON FINE: is_ping: skipping: last ran at 1380290327, now: 1380290327, time left: 1 in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: CON FINE: found connection mongodb02.dcluster:27017;drupalSet;.;2246 (looking for mongodb02.dcluster:27017;drupalSet;.;2246) in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: CON FINE: is_ping: skipping: last ran at 1380290327, now: 1380290327, time left: 1 in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: CON FINE: discover_topology: checking ismaster for mongodb01.dcluster:27017;drupalSet;.;2246 in /var/www/test- 2013/09/27 15:58:47 [error] 2089#0: *133 FastCGI sent in stderr: "in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET FINE: - all servers in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET FINE: filter_connections: adding connections: in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET FINE: - connection: type: SECONDARY, socket: 42, ping: 1, hash: mongodb03.dcluster:27017;drupalSet;.;2246 in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET FINE: - connection: type: SECONDARY, socket: 42, ping: 0, hash: mongodb02.dcluster:27017;drupalSet;.;2246 in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET FINE: filter_connections: done in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET FINE: limiting to servers with same replicaset name in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET FINE: - connection: type: SECONDARY, socket: 42, ping: 1, hash: mongodb03.dcluster:27017;drupalSet;.;2246 in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET FINE: - connection: type: SECONDARY, socket: 42, ping: 0, hash: mongodb02.dcluster:27017;drupalSet;.;2246 in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET FINE: limiting to servers with same replicaset name: done in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET FINE: limiting by credentials 2013/09/27 15:58:47 [error] 2089#0: *133 FastCGI sent in stderr: "che.inc on line 29 PHP message: PHP Notice: REPLSET FINE: - connection: type: SECONDARY, socket: 42, ping: 1, hash: mongodb03.dcluster:27017;drupalSet;.;2246 in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET FINE: selecting near server: done in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET INFO: pick server: random element 0 in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: REPLSET INFO: - connection: type: SECONDARY, socket: 42, ping: 0, hash: mongodb02.dcluster:27017;drupalSet;.;2246 in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: IO FINE: getting reply in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: IO FINE: getting cursor header in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29 PHP message: PHP Notice: IO FINE: getting cursor body in /var/www/test-app/sites/all/modules/contrib/mongodb/mongodb_cache/mongodb_cache.inc on line 29" while reading response header from upstream, client: 10.0.1.1, server: dcluster-test.twinbitlabs.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "fe01.local:90", referrer: "http://fe01.local:90/views/banners"
mongod --port 27017 --dbpath /mnt/data/db/rs0-0 --logpath /mnt/data/log/mongo-0.log --keyFile /srv/mongodb/mongodb-rs.key --replSet rs0 --smallfiles --oplogSize 128 --auth --forkmongod --port 27018 --dbpath /mnt/data/db/rs0-1 --logpath /mnt/data/log/mongo-1.log --keyFile /srv/mongodb/mongodb-rs.key --replSet rs0 --smallfiles --oplogSize 128 --auth --forkmongod --port 27019 --dbpath /mnt/data/db/rs0-2 --logpath /mnt/data/log/mongo-2.log --keyFile /srv/mongodb/mongodb-rs.key --replSet rs0 --smallfiles --oplogSize 128 --auth --fork
mongo admin --port 27017 --eval 'rs.initiate({"_id": "rs0", "version": 1, "members": [{"_id": 0, "host": "localhost:27017"},{"_id": 1, "host": "localhost:27018"},{"_id": 2, "host": "localhost:27019"}]})'
new MongoClient('mongodb://localhost:27017,localhost:27018,localhost:27019/?replicaSet=rs0');
new MongoClient('mongodb://localhost:27017,localhost:27018,localhost:27019/?replicaSet=rs0&readPreference=primaryPreferred');
I am seeing a very strange bug using the PHP driver. I am running a three member replica set, each member is running v2.2.3.
If I take a member in the replica set offline, sometime the PHP client fails to connect with:
No candidate servers found
The only way to fix it, is to restart the php-fpm worker, and magically it goes back to normal and connects. Here is my PHP connection code:
try {
$client = new MongoClient("mongodb://username-here:password-here@mongodb1.local.mydomain.com,mongodb2.local.mydomain.com,mongodb3.local.mydomain.com/my-database", array("timeout" => 10000, "replicaSet" => "rs-san-jose");
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/3f0fc2af-25d6-4733-85ca-5051974cee9c%40googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
Hi Enrico,
Although you may be seeing a similar error message, it may be a different issue that is causing it.
Please start a new discussion with relevant details of:
Thanks.
Wan.