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
Kill all workers when main process exits in prefork model #6942
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6942 +/- ##
=======================================
Coverage 89.24% 89.24%
=======================================
Files 138 138
Lines 16708 16716 +8
Branches 2116 2117 +1
=======================================
+ Hits 14911 14919 +8
Misses 1574 1574
Partials 223 223
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Hmm unittests are failing on Windows since SIGKILL are defined only on linux. I will move the logic to platform.py and exclude windows... |
This pull request introduces 2 alerts when merging ce299b6 into 917088f - view on LGTM.com new alerts:
|
ce299b6
to
ef95ed3
Compare
This pull request introduces 2 alerts when merging 4ced35b into 917088f - view on LGTM.com new alerts:
|
4ced35b
to
f772564
Compare
for more information, see https://pre-commit.ci
Note: Before submitting this pull request, please review our contributing
guidelines.
Description
This PR ensures that OS will kill all remaining workers in prefork model when main process terminates. This is applicable only for linux platform. Other OS won't handle/kill orphaned workers. This PR should help also with memory leaks caused by orphained workers - see [1]. This PR needs billiard with version >= 3.6.0.0. Fixes #102.
Example:
master branch:
PR branch:
[1] https://medium.com/squad-engineering/two-years-with-celery-in-production-bug-fix-edition-22238669601d