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

Hypercorn processes daemon property fails multiprocessing.Process / concurrent.futures.ProcessPoolExecutor #245

Open
umairanis03 opened this issue Jul 10, 2024 · 1 comment

Comments

@umairanis03
Copy link

Hypercorn worker processes are by default run with daemon set (ref). This prevents APIs like multiprocessing.Process / concurrent.futures.ProcessPoolExecutor from creating children processes from inside the application.

  ...  File "<decorator-gen-995>", line 4, in wrapped_function_illegal_multiprocessing
  ...  File "/codemill/asthanas/dpi/sample.py", line 94, in illegal_multiprocessing
    daemon_process.start()
  File "/opt/python/python-3.11/lib64/python3.11/multiprocessing/process.py", line 118, in start
    assert not _current_process._config.get('daemon'), \

AssertionError:daemonic processes are not allowed to have children

Is there any reason why worker processes need to be daemonized or if this flag could be configured? Note that, this is not the case with application servers like uWSGI or uvicorn.

@rafalkrupinski
Copy link

is it different from #191 ?

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

2 participants