If you are running your Django project in a docker container with celery and celery beat then it might be possible that you have faced this issue sometimes, when you will have redeployed your code on the docker container.
This issue occurs because celery beat creates a file in the root folder at the time of deploying and when you redeploy the code then this file resides in your root folder and celery beat can't create another file with the same name in the same location then this issue occurs.
How to fix the Pid file (celery beat.pid) already exists?
There are different methods available by which you can fix this issue easily. I am going to tell you about the file deletion method because it's easy to remove the file from the root folder.
If you are running the project in your local system then go to your code folder and find the "celerybeat.pid" file and delete/remove that file from there.
After removing the file, again restart your celery and celery beat. This will fix the issue.
0 Comments