Closed timthelion closed 5 years ago
@joekohlsdorf https://github.com/ybrs/single-beat/pull/18
Can you please post a log of a run with SINGLE_BEAT_LOG_LEVEL=debug
?
I'll try. I got the error only after running a celery task and not on startup. But I just loaded up everything again and did not reproduce the bug :/
I guess what is happening here is that your task is taking up so much CPU time that the lock expires in Redis because it doesn't get updated in time. This is exactly what the the fencing feature is meant for. single-beat should obviously exit cleanly instead of failing with an exception, I'll fix this.
You can probably mitigate this by raising SINGLE_BEAT_LOCK_TIME
, the default value is 5.
You need to use a supervisor to restart single-beat in case it exits, please see the example configuration which is linked in the README.
I'm running on Heroku.