-
Notifications
You must be signed in to change notification settings - Fork 27
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
🐛addresses blocking Thread/Process pool executors when shutting down #2397
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2397 +/- ##
========================================
- Coverage 74.2% 74.0% -0.2%
========================================
Files 518 520 +2
Lines 20320 20344 +24
Branches 2012 2016 +4
========================================
- Hits 15088 15069 -19
- Misses 4711 4758 +47
+ Partials 521 517 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
services/web/server/src/simcore_service_webserver/diagnostics_monitoring.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/projects_db.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I think that
a) one thread/process pool per app
b) thread/process poll lifetime = app lifetime
As a reference see http client (https://github.com/ITISFoundation/osparc-simcore/blob/master/packages/service-library/src/servicelib/client_session.py)
What do these changes do?
While debugging the below error, it was observed that when closing a
ThreadPoolExecutor
or aProcessPoolExecutor
, both will wait for threads/processes before closing.Where possible pools where created and reused, in all other cases a non blocking shutdown was used via contextmanger.
Related issue/s
There is an issue with cypython where a ProcessPoolExecutor which raises an error on
shutdown(wait=False)
. Will use a shard ProcessPoolExecutor where it was requested crated per request.How to test
Checklist