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

Jobs stuck issue #392

Closed TarasBardiuk closed 5 years ago

TarasBardiuk commented 5 years ago

Hello.

I'm using Sneakers on a quite big platform (hundreds of jobs per hour) and faced with very confusing problem. After some time of work, the queues seem to "freeze" and don't complete any pushed job. But if I restart the Sneakers, all "stuck" jobs are executed immediately.

I assume that the problem may lie in the fact that when performing jobs, the exception "Sneakers::WorkerTimeout: execution expired" occurs quite often. The exception itself is not critical at the current stage of development, but, I suppose, it causes all workers to freeze until a full restart.

Is there any solution? Thank you in advance.

Deivisson commented 5 years ago

I get the same issue !

TarasBardiuk commented 5 years ago

@Deivisson, what version of the gem are you using?

I found that in the most recent release, the problem of freezing workers was fixed. The preconditions for that fixed issue were slightly different, but the fact of "freezing" is the same.

I used a fairly old version 2.6.0, so I updated the gem and for now everything looks good. So I'll wait a few days and let you know about the result.

Deivisson commented 5 years ago

@TarasBardiuki was already using the latest version. But in few days when i return to the project, i discovery a problem in my code related with connection pool size, so i found solutions to increase the pool size in favor my workers and the problema look be resolved now. Already working in 2 days without freeze. If keep so, soon be in production :-)

thks for the feedback

michaelklishin commented 5 years ago

Thanks for following up back to the list. Bunny needs some metrics around worker pool size/activity.

luismiv85 commented 4 years ago

@TarasBardiuki was already using the latest version. But in few days when i return to the project, i discovery a problem in my code related with connection pool size, so i found solutions to increase the pool size in favor my workers and the problema look be resolved now. Already working in 2 days without freeze. If keep so, soon be in production :-)

thks for the feedback

Hi @Deivisson , thanks for you response. Could yo please show me how you solve this? You increased a pool size where?

Thanks so much!