uwsgi icon indicating copy to clipboard operation
uwsgi copied to clipboard

Wait for other worker thread on shutdown

Open PierreF opened this issue 3 years ago • 2 comments

When worker stop due to max-lifetime, the first thread will now wait for additional thread to complet before terminating the worker process.

This fix the issue described in #1894. With this change I never get any request error nor request that don't finish.

I think this will also fix the issue seen on production described in #2480

If you want that I make this wait behind an option, just ask and I'll update this PR.

PierreF avatar Sep 14 '22 16:09 PierreF

Is there something missing for this PR ?

PierreF avatar Oct 06 '22 16:10 PierreF

Any chance of getting a review on this one? It looks like a straightforward 4-liner bugfix to a very painful issue and I think is impacting my company as well, because the symptoms line up quite well (read: prod outages with the upgrade from Python 3.9.7 to 3.9.8 -- with the problem appearing to happen in uWSGI internal code)

@xrmx ?

svanoort avatar Sep 27 '23 20:09 svanoort

This was fixed in #2626 which is now commit 06a22597bd419860904fae6f446d8e3b714f5afa

The fix was shipped in v2.0.25, though the version's release notes are less explicit about the change than the commits https://github.com/unbit/uwsgi/compare/2.0.24...2.0.25

SteveByerly avatar Jun 26 '24 01:06 SteveByerly