You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. start an amqp server
2. start a process which polls the amqp server for messages in a queue
3. shut down the amqp server
What is the expected output? What do you see instead?
I expect to see the "throw new Exception("Error sending data")" get executed,
but in php 5.3.8 (cli) I get a repeating error which quickly fills up my
log/disk with this:
Notice: fwrite(): send of 12 bytes failed with errno=32 Broken pipe in
/var/www/sites/oxygen/library/Lava/Amqp/php-amqplib/amqp.inc on line 481
PHP Notice: fwrite(): send of 12 bytes failed with errno=32 Broken pipe in
/var/www/sites/oxygen/library/Lava/Amqp/php-amqplib/amqp.inc on line 481
Notice: fwrite(): send of 12 bytes failed with errno=32 Broken pipe in
/var/www/sites/oxygen/library/Lava/Amqp/php-amqplib/amqp.inc on line 481
PHP Notice: fwrite(): send of 12 bytes failed with errno=32 Broken pipe in
/var/www/sites/oxygen/library/Lava/Amqp/php-amqplib/amqp.inc on line 481
Notice: fwrite(): send of 12 bytes failed with errno=32 Broken pipe in
/var/www/sites/oxygen/library/Lava/Amqp/php-amqplib/amqp.inc on line 481
PHP Notice: fwrite(): send of 12 bytes failed with errno=32 Broken pipe in
/var/www/sites/oxygen/library/Lava/Amqp/php-amqplib/amqp.inc on line 481
What version of the product are you using? On what operating system?
I'm using centos 5.5, php 5.3.8 (cli) and php-amqplib 0.8
Please provide any additional information below.
Here is a diff that I made so that when fwrite returns 0 bytes written an
exception is thrown and we don't get stuck in the loop.
Index: php-amqplib/amqp.inc
===================================================================
--- php-amqplib/amqp.inc (revision 13432)
+++ php-amqplib/amqp.inc (working copy)
@@ -482,6 +482,10 @@
{
throw new Exception ("Error sending data");
}
+ if($written === 0 ) {
+ throw new Exception("Error sending data");
+ }
$len = $len - $written;
if($len>0)
$data=substr($data,0-$len);
Original issue reported on code.google.com by [email protected] on 7 Mar 2012 at 11:10
The text was updated successfully, but these errors were encountered:
I also produce this problem ,like this:"PHP Notice: fwrite(): send of 19 bytes
failed with errno=32 Broken pipe ".What's the reason?My god,I've looking for
this for 2 hours.Waiting for answer!
Original comment by jiangwb2012 on 16 May 2012 at 3:59
I'm not a a contributor to this project so I don't know what the process is for
getting a patch into the SVN, but the patch I provided has been in production
use at my company since I submitted it here. Seems like a pretty
straightforward bug and fix.
Original issue reported on code.google.com by
[email protected]
on 7 Mar 2012 at 11:10The text was updated successfully, but these errors were encountered: