|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-03-16 09:03 UTC] gpavone at sixco dot it
-PHP Version: Irrelevant
+PHP Version: 5.4.38
[2015-03-16 09:03 UTC] gpavone at sixco dot it
[2015-03-16 14:14 UTC] gpavone at sixco dot it
-Operating System: Debian 3.2.63
+Operating System: Debian 7 Wheezy
[2015-03-16 14:14 UTC] gpavone at sixco dot it
[2015-04-03 17:13 UTC] jmikola@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: jmikola
[2015-04-03 17:13 UTC] jmikola@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 17 05:00:01 2025 UTC |
Description: ------------ I have 3 different mongodb servers (v3.0) running in a replica set on a vlan, and 2 separate web servers running php/nginx on another vlan (php-mongo 1.6.5). If I just STOP the mongod process, all goes fine. If I kill one of the mongo servers (turn it off or unplug NIC) the replica set does a good job at picking a new master, but my PHP (v5.4.35) scripts seem to hang and that eventually just kills the web servers. Test script: --------------- function write($filepath, $metadata, $database, $collection) { $mongo = new MongoClient("mongodb://stgndb01:27017,stgndb02:27017", array("replicaSet" => "stgndb00")); $db = $mongo->selectDB($database); $gridFS = new MongoGridFS($db, $collection); $result = $gridFS->storeFile($filepath, $metadata, array("w" => 0)); if($result === FALSE) { echo 'KO'; } else { echo 'OK'; } }