AMQPSSLConnection连接超时
当我创建一个新的AMQPSSLConnection对象时,我正在使用Amazon MQ Rabbit的PHP库PHP-AMQPLIB
使用以下
$this->connection = new AMQPSSLConnection(
$params->get('rabbit_host'),
$params->get('rabbit_port'),
$params->get('rabbit_username'),
$params->get('rabbit_password'),
$params->get('rabbit_vhost'),
[
'verify_peer' => false
],
[
'heartbeat' => 20,
'connection_timeout' => 99999,
'read_write_timeout' => 99999,
'channel_rpc_timeout' => 99999
]
);
内容:
[phpamqplib \ extception \ amqptimeOutException]在0.33318181881904602 sec之后均超时,请访问该连接。数据
在脚本运行60秒后。我尝试了各种心跳和超时设置的值,但是没有一个使脚本运行
编辑 - 此问题是由我将超时值传递到$ channel-> wait()引起的。一旦我增加了第三个参数值(超时),则解决了问题
I am using the PHP library php-amqplib with Amazon MQ Rabbit
When I create a new AMQPSSLConnection object with like the following:
$this->connection = new AMQPSSLConnection(
$params->get('rabbit_host'),
$params->get('rabbit_port'),
$params->get('rabbit_username'),
$params->get('rabbit_password'),
$params->get('rabbit_vhost'),
[
'verify_peer' => false
],
[
'heartbeat' => 20,
'connection_timeout' => 99999,
'read_write_timeout' => 99999,
'channel_rpc_timeout' => 99999
]
);
I get the error:
[PhpAmqpLib\Exception\AMQPTimeoutException] The connection timed out after 0.33181881904602 sec while awaiting incoming data
after 60 seconds of the script running. I've tried various values for heartbeat and timeout settings but none keep the script running
Edit - This issue was caused by me passing in a timeout value to $channel->wait(). Once I increased the 3rd parameter value (timeout), the issue was resolved
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题是由于我向 $channel->wait() 传递了一个超时值引起的。一旦我增加了第三个参数值(超时),问题就解决了
This issue was caused by me passing in a timeout value to $channel->wait(). Once I increased the 3rd parameter value (timeout), the issue was resolved