Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

celery killing itself? #8997

Open
lewijw opened this issue May 1, 2024 Discussed in #8994 · 0 comments
Open

celery killing itself? #8997

lewijw opened this issue May 1, 2024 Discussed in #8994 · 0 comments

Comments

@lewijw
Copy link
Contributor

lewijw commented May 1, 2024

Discussed in #8994

Originally posted by lewijw April 30, 2024
I'm running celery in a pod in k8s, and I am seeing a situation where it starts as PID 1, writes the pid file, and seems to crash for some reason. Then, k8s restarts the process; it starts again as PID 1; but since the pid file has a 1 in it, I am wondering if it is killing itself? I'm not a python expert, but this code seems to need a comparison of os.getpid() with the contents of the pid file before killing the process.
https://github.com/celery/celery/blob/main/celery/platforms.py#L191

lewijw added a commit to lewijw/celery that referenced this issue May 2, 2024
Nusnus pushed a commit to lewijw/celery that referenced this issue May 2, 2024
lewijw added a commit to lewijw/celery that referenced this issue May 2, 2024
Nusnus pushed a commit to lewijw/celery that referenced this issue May 3, 2024
Nusnus pushed a commit to lewijw/celery that referenced this issue May 3, 2024
auvipy added a commit that referenced this issue May 5, 2024
* don't kill if pid same as file (#8997)

* test for don't kill if pid same as file (#8997)

* restore file permission

---------

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
lewijw added a commit to lewijw/celery that referenced this issue May 6, 2024
auvipy pushed a commit that referenced this issue May 9, 2024
The pid file needs to be deleted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant