You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am using
celery==5.1.2
redis==3.5.3
django-celery-beat==2.2.1
I have schedule a task to run at every 60 seconds. The task role is just to generate a pub sub message.
The code is deployed in over docker and i am finding that worker is crashing regularly with below message
bdpmgr-celery_worker-1 | [2021-10-26 06:30:56,829: ERROR/MainProcess] Process 'ForkPoolWorker-6' pid:67 exited with 'signal 11 (SIGSEGV)'
I have tried all the settings task_per_worker ,memory_per_worker still getting this error
Reacted by Oleksandr, Mykhailo Havelia, Durim Morina, kwongtn98, Mauro Sciancalepore, Alberto, Christian Short, Dan LaManna, Max Wittig, vikram-ray and 11 more
Hey @nitishxp 👋,
Thank you for opening an issue. We will get back to you as soon as we can.
Also, check out our Open Collective and consider backing us - every little helps!
We also offer priority support for our sponsors.
If you require immediate assistance please consider sponsoring us.
I'm having the same problem when I attempt to use SQLAlchemy in a Celery task. Everything else in the task works, but as soon as I try to use SQLAlchemy, I get the signal 11 error. Has anyone had any luck fixing this?
Reacted by Christian Short
Reacted by sinisarudan, bwebs, alirohero and atthana
This issue occurred for me after installing Android Studio on my Mac. Anytime I try to execute a Sqlalchemy command inside a celery task it crashes python and I get the signal 11 error. I can't find any logs that could help point to where inside Sqlalchemy it is failing.
My temporary solution was to set --pool threads and use the main process instead of a forked worker which is working for now. So to sum it up the issue is running sqlalchemy inside of a celery task inside of a forked pool worker.
Reacted by Shubham Sharma, designwill, xucian, Ryan Aquino and AmirAli Akbari
WorkerLostError: Worker exited prematurely: signal 11 (SIGSEGV) Job: 110820.
......
File "celery/result.py", line 705, in get
return (self.join_native if self.supports_native_join else self.join)(
File "celery/result.py", line 836, in join_native
raise value
WorkerLostError: Worker exited prematurely: signal 11 (SIGSEGV) Job: 91085.
......
File "celery/result.py", line 251, in get
return self.backend.wait_for_pending(
File "celery/backends/asynchronous.py", line 223, in wait_for_pending
return result.maybe_throw(callback=callback, propagate=propagate)
File "celery/result.py", line 365, in maybe_throw
self.throw(value, self._to_remote_traceback(tb))
File "celery/result.py", line 358, in throw
self.on_ready.throw(*args, **kwargs)
File "vine/promises.py", line 235, in throw
reraise(type(exc), exc, tb)
File "vine/utils.py", line 27, in reraise
raise value
Task handler raised error: "WorkerLostError('Worker exited prematurely: signal 11 (SIGSEGV) Job: 142338.')"
WorkerLostError:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/billiard/pool.py", line 1264, in mark_as_worker_lost
raise WorkerLostError(
billiard.exceptions.WorkerLostError: Worker exited prematurely: signal 11 (SIGSEGV) Job: 142338.
"""
File "billiard/pool.py", line 1264, in mark_as_worker_lost
raise WorkerLostError(
Started having this issue after updating macos to tahoe.
It looks like celery uses unsafe fork APIs? I'm saying this just because of this post below (not tested or witnessed by myself).
Same here for Tahoe 26.0.1, there is a new issue #9894 that might be related.
In my setup celery runs tasks for a django app and crashes when starting the run of a new task. A possible workaround is, as stated above, running celery with --pool solo (single threaded, blocking) or --pool threads as this only happens on the default of prefork.
According to the stacktrace it seems that the creation of a new postgres connection is the problem in my case, see the info below:
i think this might have fixed with recent billiard release and in celery main branch, which should be released with v5.7.0alpha1. please verify after the release
Activity
open-collective-bot commentedon Oct 26, 2021
Hey @nitishxp 👋,
Thank you for opening an issue. We will get back to you as soon as we can.
Also, check out our Open Collective and consider backing us - every little helps!
We also offer priority support for our sponsors.
If you require immediate assistance please consider sponsoring us.
auvipy commentedon Oct 26, 2021
please use apropriate issue template otherwise the issue would be closed
nitishxp commentedon Oct 26, 2021
@auvipy I have check all the issues , have search in google groups, I also used the latest 5.2.0rc1 build, still getting the same errors.
AlexBohdan commentedon Nov 22, 2021
@auvipy Hello, I have the same problem in my project.
Precondition:
Problem:
Only on python 3.7 and 3.6 versions, this error doesn't occur. I already tried to delete max-memory-per-child, but it doesn`t help.
Details:
Celery startup command:

pip freeze:
Have you any idea what I can do to resolve or debug this problem?
RRGTHWAR commentedon Nov 24, 2021
I'm having the same problem when I attempt to use SQLAlchemy in a Celery task. Everything else in the task works, but as soon as I try to use SQLAlchemy, I get the signal 11 error. Has anyone had any luck fixing this?
cosmos-sajal commentedon Feb 26, 2022
Having the same issue. Any luck solving this?
AlexBohdan commentedon Aug 30, 2022
Hello everyone, I solve this problem by updating python directly to version 3.10 (in docker file
FROM python:3.10-slim-bullseye)auvipy commentedon Aug 31, 2022
was considering closing this based on your feedback
amegianeg commentedon Aug 31, 2023
This issue happens with Celery 5.3.1 and Python 3.11.4/5.
Coverttrickster commentedon Sep 29, 2023
This issue occurred for me after installing Android Studio on my Mac. Anytime I try to execute a Sqlalchemy command inside a celery task it crashes python and I get the signal 11 error. I can't find any logs that could help point to where inside Sqlalchemy it is failing.
My temporary solution was to set --pool threads and use the main process instead of a forked worker which is working for now. So to sum it up the issue is running sqlalchemy inside of a celery task inside of a forked pool worker.
houzhiqiang commentedon Nov 14, 2023
CPython 3.11.5(3.11.5 (main, Sep 7 2023, 12:36:05) [GCC 12.2.0])
celery 5.3.5
WorkerLostError
Worker exited prematurely: signal 11 (SIGSEGV) Job: 91085.
WorkerLostError: Worker exited prematurely: signal 11 (SIGSEGV) Job: 110820.
......
File "celery/result.py", line 705, in get
return (self.join_native if self.supports_native_join else self.join)(
File "celery/result.py", line 836, in join_native
raise value
WorkerLostError: Worker exited prematurely: signal 11 (SIGSEGV) Job: 91085.
......
File "celery/result.py", line 251, in get
return self.backend.wait_for_pending(
File "celery/backends/asynchronous.py", line 223, in wait_for_pending
return result.maybe_throw(callback=callback, propagate=propagate)
File "celery/result.py", line 365, in maybe_throw
self.throw(value, self._to_remote_traceback(tb))
File "celery/result.py", line 358, in throw
self.on_ready.throw(*args, **kwargs)
File "vine/promises.py", line 235, in throw
reraise(type(exc), exc, tb)
File "vine/utils.py", line 27, in reraise
raise value
Task handler raised error: "WorkerLostError('Worker exited prematurely: signal 11 (SIGSEGV) Job: 142338.')"
WorkerLostError:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/billiard/pool.py", line 1264, in mark_as_worker_lost
raise WorkerLostError(
billiard.exceptions.WorkerLostError: Worker exited prematurely: signal 11 (SIGSEGV) Job: 142338.
"""
File "billiard/pool.py", line 1264, in mark_as_worker_lost
raise WorkerLostError(
29 remaining items
cameron-dd commentedon Sep 24, 2025
Facing the same issue I don't want to use threads what the solution
fasfsfgs commentedon Sep 28, 2025
Started having this issue after updating macos to tahoe.
It looks like celery uses unsafe fork APIs? I'm saying this just because of this post below (not tested or witnessed by myself).
https://www.linkedin.com/posts/purnima-chowrasia_python-celery-macos-activity-7377020946253008898-v1SQ
dbIgel commentedon Oct 1, 2025
Same here for Tahoe 26.0.1, there is a new issue #9894 that might be related.
In my setup celery runs tasks for a django app and crashes when starting the run of a new task. A possible workaround is, as stated above, running celery with
--pool solo(single threaded, blocking) or--pool threadsas this only happens on the default ofprefork.According to the stacktrace it seems that the creation of a new postgres connection is the problem in my case, see the info below:
Click to open stack trace and system info
auvipy commentedon Sep 20, 2026
i think this might have fixed with recent billiard release and in celery main branch, which should be released with v5.7.0alpha1. please verify after the release