gpt4 book ai didi

php - RabbitMQ 错误 : fwrite(): send of 12 bytes failed with errno=104 Connection reset by peer

转载 作者:可可西里 更新时间:2023-11-01 13:24:11 25 4
gpt4 key购买 nike

我正在使用 RabbitMQ 库 videlalvaro/php-amqplibLaravel 4.2 里面应用程序,我开始收到以下错误:

fwrite(): send of 12 bytes failed with errno=104 Connection reset by peer"

任何人都可以提出任何可能导致此问题的建议吗?

最佳答案

"Connection reset by peer" is the TCP/IP equivalent of slamming the phone back on the hook. It's more polite than merely not replying, leaving one hanging. But it's not the FIN-ACK expected of the truly polite TCP/IP converseur. (From other SO answer)

所以你也没办法,是服务器的问题。

但是您可以使用 try .. catch block 来处理该异常:

try {
$msg = new AMQPMessage('Hello World!');
$channel->basic_publish($msg, '', 'hello');

} catch (Exception $e) {
// handle exception
}

关于php - RabbitMQ 错误 : fwrite(): send of 12 bytes failed with errno=104 Connection reset by peer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29653843/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com