Broken pipe or closed connection - PhpAmqpLib\Connection\AMQPLazySSLConnection::channel
Hi,
Iam getting Broken pipe or closed connection error intermittently in server
vladimir-yuldashev/laravel-queue-rabbitmq: 11.3, php: 7.4
PhpAmqpLib\Exception\AMQPConnectionClosedException · Broken pipe or closed connection Full Trace Rawvendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php:171 PhpAmqpLib\Wire\IO\StreamIO::read
while ($read < $len)
{
if (!is_resource($this->sock) || feof($this->sock)) {
$this->close();
throw new AMQPConnectionClosedException('Broken pipe or closed connection');
}
$this->setErrorHandler();
vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPLazySSLConnection.php:14 PhpAmqpLib\Connection\AMQPLazySSLConnection::channel
{
$this->connect();
return parent::channel($channel_id);
}
Bug image - https://imgur.com/a/pNxBgSJ
Thank you.
did you fix this @shifas05 ? I'm facing same issue
You managed to solve the problem? I have the same mistake. How did you solve the problem?
I set RABBITMQ_VHOST value in env to '/' and problem solved. RABBITMQ_VHOST='/'
Hello Guys,
I have the same problem. Sometimes this error happens and then stops by itself.
I run my queue with queue:work. Do you do that too, or do you run a command rabbitmq:consume?
Connection errors are to be expected. When those happen, other laravel queue implementation will stop the worker and this library is following the same pattern. The best way around this is to restart your workers after such failure. Tools like supervisord are usually chosen for this.