PhpAmqpLib: Uncaught exception 'ErrorException' with message 'fwrite(): send of 19 bytes failed with errno=104 Connection reset by peer' PhpAmqpLib: Uncaught exception 'ErrorException' with message 'fwrite(): send of 19 bytes failed with errno=104 Connection reset by peer' symfony symfony

PhpAmqpLib: Uncaught exception 'ErrorException' with message 'fwrite(): send of 19 bytes failed with errno=104 Connection reset by peer'


The best way would be to see what is in the logs of rabbitmq server if you have access to it.

Other than that judging by the fact that it happens on average when the script reaches 30secs execution time I'd like to suggest you to control the amount of messages for your client as it looks like it chokes on the number of messages from your broker.

In terms of phpamqplib try to do the following right after declaring your queue:

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

and see if it works. If it does not I believe the network settings/environment is the issue.