jondot / sneakers

A fast background processing framework for Ruby and RabbitMQ
https://github.com/jondot/sneakers
MIT License
2.24k stars 333 forks source link

Sneakers don't consume from Rabbitmq after hours inactivity #440

Closed luismiv85 closed 3 years ago

luismiv85 commented 4 years ago

We are getting a strange behavior. When start sneakers workers they can be able to connect and read from rabbitmq. All is fine and the can process messages from rabbitmq. At night, there is no work to do and here is the strange, at morning when we push messages into rabbitmq, sneakers workers don't read the new messages and they get making heartbeat all the time.

2020-05-06T07:49:46Z p-6247 t-ovnkbribk DEBUG: Sending a heartbeat, last activity time: 2020-05-05 13:35:06 +0200, interval (s): 14
2020-05-06T07:49:46Z p-6503 t-gn0athkpk DEBUG: Sending a heartbeat, last activity time: 2020-05-05 14:06:49 +0200, interval (s): 14
2020-05-06T07:49:46Z p-6054 t-goioffkqc DEBUG: Heartbeat: running threads [9]
2020-05-06T07:49:46Z p-6159 t-goioffkqc DEBUG: Heartbeat: running threads [9]

Nothing into logs, no errors, ...

The only way to solve this is restarting sneakers workers. This behavior is a poltergeist case.

Any suggestions o any similar case? We found thoses issues but did not solve our problem :( : https://github.com/jondot/sneakers/issues/392 https://github.com/jondot/sneakers/issues/153 https://github.com/jondot/sneakers/issues/244

Sneakers version: sneakers (2.12.0)

Thanks sneakers community.

Christianlauw123 commented 3 years ago

Same here, After hours inactivity, i got issue restart immediate and sneakers stopped So every time i always start manually Sneakers version: 2.11.0

michaelklishin commented 3 years ago

There are no consumer timeouts of any kind in Sneakers, its underlying client or RabbitMQ. See server logs for evidence of detected peer unavailability or any kind of channel exceptions.

Bunny supports automatic connection recovery but it can be unintentionally disabled for a user-provided connection, for example.