Hello, i am facing this issue:
PHP Fatal error: Uncaught exception 'PhpAmqpLib\Exception\AMQPTimeoutException' with message 'The connection timed out after 3 sec while awaiting incoming data' in /var/www/personal/xxxxxx/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPReader.php:132
Stack trace:
#0 /var/www/personal/xxxxxx/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPReader.php(148): PhpAmqpLib\Wire\AMQPReader->wait()
#1 /var/www/personal/xxxxxx/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPReader.php(106): PhpAmqpLib\Wire\AMQPReader->rawread(7)
#2 /var/www/personal/xxxxxx/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(522): PhpAmqpLib\Wire\AMQPReader->read(7)
#3 /var/www/personal/xxxxxx/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(570): PhpAmqpLib\Connection\AbstractConnection->wait_frame(3)
#4 /var/www/personal/xxxxxx/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(225): PhpAmqpLib\Connection\AbstractConnection->wait_ch in /var/www/personal/xxxxxx/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPReader.php on line 132
Does anyone know how to fix it?
Thanks!
Does your queue have any data? Can you share code to reproduce this?
Same issue after upgrading from PHP 7.2 to 7.3
It would really, really help to provide more information, like code, steps to reproduce, messages from your AMQP broker's logs. Anything other than "me too".
same happens to me.
I declared a queue from rabbitmq admin web interface 'my_queue', then I created a consumer with this code:
$callback = function ($msg) {
echo ' [x] Received ', $msg->body, "\n";
};
$channel->basic_consume('my_queue', '', false, true, false, false, $callback);
while (count($channel->callbacks)) {
$channel->wait();
}
I started the consumer but this error appeared.
The connection timed out after 3 sec while awaiting incoming data
The issue was in the port where the client listening to, it was set to "15672" while it should be "5672".
Port 15672 for rabbitmq web interface.
Port 5672 for rabbitmq client.
Fixed by #642, closing.
same happens to me.
I declared a queue from rabbitmq admin web interface 'my_queue', then I created a consumer with this code:$callback = function ($msg) { echo ' [x] Received ', $msg->body, "\n"; }; $channel->basic_consume('my_queue', '', false, true, false, false, $callback); while (count($channel->callbacks)) { $channel->wait(); }I started the consumer but this error appeared.
The connection timed out after 3 sec while awaiting incoming dataThe issue was in the port where the client listening to, it was set to "15672" while it should be "5672".
Port 15672 for rabbitmq web interface.
Port 5672 for rabbitmq client.
Thank you.. It works fine.. when I change port to rabbitmq client as 5672..
Most helpful comment
same happens to me.
I declared a queue from rabbitmq admin web interface 'my_queue', then I created a consumer with this code:
I started the consumer but this error appeared.
The issue was in the port where the client listening to, it was set to "15672" while it should be "5672".
Port 15672 for rabbitmq web interface.
Port 5672 for rabbitmq client.