|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-12-19 19:55 UTC] zorg at razza dot org
[2015-12-19 19:55 UTC] zorg at razza dot org
-Status: Open
+Status: Closed
[2015-12-19 19:55 UTC] zorg at razza dot org
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 10:00:01 2025 UTC |
Description: ------------ When using pcntl_fork() with the new MongoDB\Driver it is impossible to create a new MongoDB manager in the child process if one has been opened in the parent process. Test script: --------------- $manager1 = MongoDB\Driver\Manager('mongodb://localhost:27017'); $pid = pcntl_fork(); if ($pid == 0) { // Child process, create a new manager here unset($manager1); $manager2 = MongoDB\Driver\Manager('mongodb://localhost:27017'); // Perform queries with $manager2 here } else { // Parent process, retain old manager // Perform queries with $manager1 here } Expected result: ---------------- Expected to have a new MongoDB connection in $manager2 that the child process can use. Actual result: -------------- Both managers, even the newly created on in the child process seem to share a socket to MongoDB and throw errors based on receiving each others responses.