Skip to content

>>Uncaught Bunny\Exception\ClientException: Broken pipe or closed connection.<< and how to solve it

We were running into this issue when our consumers or producers had nothing to do in a minute or less.

After searching the web, we found this issue ticket within the conversation.

Long story short, we could solve our problem by overwriting the default heartbeat with 30 seconds.

//this is an example but full blown configuration we are using
$client = new Client(
        'heartbeat' => 30,
        'host'      => '',
        'password'  => 'guest',
        'user'      => 'guest',
        'vhost'     => '/'

If you want to know more, you can read about rabbitmq networking here and about rabbitmq detecting dead tcp connections with heartbeat and tcp keepalives here

Translate to de es fr it pt ja
Categories: coding
Defined tags for this entry:
Vote for articles fresher than 7 days!
[0] 906 hits