Broken pipe or closed connection? #1095
tuongtd
started this conversation in
Help wanted
Replies: 2 comments 3 replies
-
still facing same issue? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Check your configuration. Version 3.5.4 got bug in AMQPConnectionConfig.php. Method setIsSecure() which is decide to use SSLConnection not change parameter networkProtocol: public function setIsSecure(bool $isSecure): void
{
$this->isSecure = $isSecure;
} When it's passed AMQPConnectionConfig class to AMQPConnectionFactory.php networkProtocol parameter is still default 'tcp' and it's directly passed to AMQPSSLConnection.php by if ($config->getIoType() === AMQPConnectionConfig::IO_TYPE_STREAM) {
if ($config->isSecure()) {
$connection = new AMQPSSLConnection(
$config->getHost(),
$config->getPort(),
$config->getUser(),
$config->getPassword(),
$config->getVhost(),
self::getSslOptions($config),
[
'insist' => $config->isInsist(),
'login_method' => $config->getLoginMethod(),
'login_response' => $config->getLoginResponse(),
'locale' => $config->getLocale(),
'connection_timeout' => $config->getConnectionTimeout(),
'read_write_timeout' => self::getReadWriteTimeout($config),
'keepalive' => $config->isKeepalive(),
'heartbeat' => $config->getHeartbeat(),
],
$config->getNetworkProtocol(),
$config
);
} You can fix it using method |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My consumer service get "Broken pipe or closed connection" error but I don't know why.
I follow this tutorial: https://www.rabbitmq.com/tutorials/tutorial-one-php.html
Everything seems to be running fine. But every time I try to push about 30k messages, the consumer console has stopped and throw error "Broken pipe or closed connection".
How to fix this problem? I tried use basic_qos(0, 200, false) but nothing changed. Do I have to change PHP configuration?
Thank!
PHP: 8.1
php-amqplib: 3.5.1
RabbitMQ: 3.10.6
Beta Was this translation helpful? Give feedback.
All reactions