|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-05-21 20:20 UTC] 66ton99 at gmail dot com
[2012-05-21 20:20 UTC] 66ton99 at gmail dot com
-PHP Version: 5.3.13
+PHP Version: 5.3.10
[2012-11-14 02:08 UTC] bkw at codingforce dot com
[2012-11-14 02:11 UTC] bkw at codingforce dot com
[2012-11-14 14:21 UTC] bkw at codingforce dot com
[2013-04-17 15:34 UTC] bkw@php.net
[2013-04-17 15:34 UTC] bkw@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: bkw
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 01:00:01 2025 UTC |
Description: ------------ It crashes on next iteration after created fork process by pcntl_fork() Test script: --------------- <?php $connection = new AMQPConnection();$connection->connect(); $channel = new AMQPChannel($connection); $q = new AMQPQueue($channel);$q->setName('queue.hello');$q->declare(); while (true) { $msg = $q->get(AMQP_NOPARAM); // It will crush on second iteration sleep(2); if ($msg) { echo $msg->getBody() . "\n"; $q->ack($msg->getDeliveryTag()); } switch ($pid = pcntl_fork()) { case -1: // Fail die("Cant create fork process"); case 0: echo "New process \n"; exit; // The end of the forked process default: pcntl_wait($status, WNOHANG); //Protects against Zombie children break; } } $connection->disconnect(); // disconnect Expected result: ---------------- It some times freeze and lost Channel but not the connection. But usually throw PHP Fatal error: Uncaught exception 'AMQPQueueException' with message 'Unknown server error occurred.'