This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Celery Worker doesn't start consuming tasks until 15 min after restart on Debian 12 #8445
Labels
You can continue the conversation there. Go to discussion →
I have come across a situation on Debian 12 with Celery 5.3.1, I even downgraded to Celery 5.2.7, but it didn't help.
I then reinstalled the VPS with Debian 11 with Celery 5.3.1 and it works instantly. Same code no difference.
I keep thinking how can I break down the problem further. How can this the fault of Debian 12? Has perhaps something changed in Debian 12 that affects running Celery as a service? I'm a bit speechless. For the time being I have to delay our migration to Debian 12 until I figure out what is affecting Celery.
On Debian 12, when I try to restart Celery it takes 5 min to shutdown and restart. There is no error in the logs.
After restart I see this in logs:
As you can see it takes 15 min for it to become available. Once it's online it consumes all the outstanding tasks very quickly in milliseconds:
This is Celery Beat, it also has a hard time starting, but once it has started, but won't take long until the first beats get in.
However they won't be consumed until celery is up and running, which takes 15 min. After that delay everything is smooth, but 15+ min delay is not acceptable, in case something happens in production and we need to restart the service.
It is the same code, same task, same celery version, how comes it works perfectly fine on Debian 11, but hangs on Debian 12?
Has perhaps my way of creating the Celery service changed for Debian 12?
Thank you, much appreciated for any advice
The text was updated successfully, but these errors were encountered: