Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMQP SSL Broken Pipe #669

Closed
harlekoy opened this issue Mar 29, 2019 · 3 comments
Closed

AMQP SSL Broken Pipe #669

harlekoy opened this issue Mar 29, 2019 · 3 comments

Comments

@harlekoy
Copy link

harlekoy commented Mar 29, 2019

PhpAmqpLib\Exception\AMQPRuntimeException  : fwrite(): SSL: Broken pipe

  at /Users/harlequindoyon/Sites/project/website/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php:314
    310|                 $buffer = fwrite($this->sock, mb_substr($data, $written, 8192, 'ASCII'), 8192);
    311|                 $this->cleanup_error_handler();
    312|             } catch (\ErrorException $e) {
    313|                 restore_error_handler();
  > 314|                 throw new AMQPRuntimeException($e->getMessage());
    315|             }
    316|
    317|             if ($buffer === false) {
    318|                 throw new AMQPRuntimeException('Error sending data');

  Exception trace:

  1   PhpAmqpLib\Wire\IO\StreamIO::write("\\\\
                                              \\(\\\\\\\�")
      /Users/harlequindoyon/Sites/project/website/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php:349

  2   PhpAmqpLib\Connection\AbstractConnection::write("\\\\
                                                           \\(\\\\\\\�")
      /Users/harlequindoyon/Sites/project/website/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php:470

  Please use the argument -v to see more details.
PHP Fatal error:  Uncaught PhpAmqpLib\Exception\AMQPRuntimeException: fwrite(): SSL: Broken pipe in /Users/harlequindoyon/Sites/project/website/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php:314
Stack trace:
#0 /Users/harlequindoyon/Sites/project/website/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(349): PhpAmqpLib\Wire\IO\StreamIO->write('\x01\x00\x01\x00\x00\x00\v\x00\x14\x00(\x00\x00\x00\x00...')
#1 /Users/harlequindoyon/Sites/project/website/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(470): PhpAmqpLib\Connection\AbstractConnection->write('\x01\x00\x01\x00\x00\x00\v\x00\x14\x00(\x00\x00\x00\x00...')
#2 /Users/harlequindoyon/Sites/project/website/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(240): PhpAmqpLib\Connection\AbstractConnection->send_channel_method_frame(1, Array, Object(PhpAmqpLib\Wire\AMQPWriter))
#3 /Users/harlequindoyon/Sites/project/website/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php(167 in /Users/harlequindoyon/Sites/project/website/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 314
☁  website [master] ⚡

anyone here knows what causes this issue above?

@lukebakken
Copy link
Collaborator

"Broken pipe" is probably a transient network error. There's not enough information here to diagnose, and guessing isn't productive. You need to provide information like the following:

  • Versions of all software in use - this library, AMQP broker
  • A description of your environment. Is the AMQP broker running on the same machine? This looks like output from a development laptop, is that the case?
  • A better description of events leading up to this exception. Were some messages published? Is this issue transient?
  • AMQP broker logs from the same point in time

Closing this issue but if the above information is provided and shows evidence of a bug in this library I will re-open it.

@ramunasd
Copy link
Member

@harlekoy I wonder if we can extract error code from this warning? Can You try to reproduce it with this test script? https://gist.github.com/ramunasd/531214db3420ca8f95cb0fe0f3e5de21

@harlekoy
Copy link
Author

harlekoy commented Mar 30, 2019

Thanks @ramunasd, i have already fixed the issue. I think its because of the heart beat of my AMQP which got out of sync during sending of message. So basically i did the receiving of message then processing it automatically which really takes time to finish before moving to another one. So the fix was i just added every message to my background queue worker and process it later so that it can still sync to the latest message sent 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants