PhpAmqpLib:未捕获的异常'ErrorException',带有消息'fwrite(): send of 19 bytes failed with errno=104 Connectio



My RabbitMQ使用者在处理一些消息后崩溃,并出现以下错误:

/usr/bin/php/var/www/mydomain/integration.mydomain.com/current/app/console rabbitmq:consumer-w-segment--env=prod

[PhpAmqpLib\Exception\AMQPRuntimeException]
无效帧类型65

rabbitmq:consumer[-m|--messages[messages]][-r|--route[route]][-l|--memory limit]][-d|--debug][-w|--without signals][-h|--help][-q|--quiet][-v|vvv|--verbose][-v|--version][-ansi][-no ansi][/n|--no interaction][-s|--shell][-进程隔离][-e|--env env][-no debug][-]

PHP致命错误:未捕获的异常"ErrorException",消息为"fwrite():发送19个字节失败,错误号=104对等方重置连接",位于/var/www/mydomain/integration.mydomain.com/shared/vendor/PHP-amqlib/PhpAmqpLib/PhpAmqpLib/Wire/IO/StreamIO.PHP:281堆栈跟踪:0[内部函数]:PhpAmqpLib\Wire\IO\StreamIO->error_handler(8,'fwrite():send…','/var/www/tracti…',281,阵列)1/var/www/mydomain/integration.mydomain.com/shared/vendor.php amqplib/PhpAmqpLib/PhpAmqpLib/Wire/IO/StreamIO.php(281):fwrite(资源id#809,'\x01\x00\x01\x0\x00\x00\v\x00\x14\x00(\x00\x00\x0\x00…',8192)2/var/www/mydomain/integration.mydomain.com/shared/vendor.php amqplib/PhpAmqpLib/PhpAmqpLib/Connection/AbstractConnection.php3/var/www/mydomain/integration.mydomain.com/shared/vendor.php amqplib/PhpAmqpLib/PhpAmqpLib/Connection/AbstractConnection.php(448):PhpAmqpLib\Connect in/var/www/mydomain/integration.midomain.com/shared/vendor/php-amqlib/php-aqplib/PlpAmqpLib/Wire/IO/StreamIO.php on line 281

当前队列有大约3万条消息,但我将所有消息移到了一个新的队列中,然后使用空队列重试,错误仍然存在。

我有足够的可用内存(180GB可用内存)

消费者在处理一些消息后崩溃,通常需要30秒才能崩溃。

此队列只有一个使用者。

RabbitMQ配置是默认配置。

我使用的是Symfony2、mongodb和Debian Jessie。

另一条线索是,它总是在27或28秒后坠毁。

你知道吗?

谢谢。

如果您可以访问rabbitmq-server,最好的方法是查看它的日志中有什么。

除此之外,当脚本执行时间达到30秒时,平均会发生这种情况,我建议您控制客户端的消息量,因为它看起来会阻塞来自代理的消息数量。

就phpamqplib而言,在声明队列后尝试执行以下操作:

$channel->basic_qos(null, 10, null);

看看它是否有效。如果没有,我认为网络设置/环境是问题所在。

相关内容

最新更新