question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RFC: Always run workers in a subprocess.

See original GitHub issue

Proposal: Always run workers in a subprocess.

Currently, when in PRODUCTION mode with workers=1, the server runs in the main process. This can lead to a discrepancy since the server(s) will be in a subprocess if:

  • there are multiple workers
  • auto_reload is enabled

We can create a more consistent experience if it will always be in a subprocess.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ahopkinscommented, Mar 23, 2022

All that sounds good. Any chance of having a pathway to fixing Windows (or MacOS) where forking is not possible?

Yes, I think this is doable. I have had it working, but not done a full test yet to make sure it does not cause a regression somewhere else.

0reactions
Troniccommented, Mar 23, 2022

All that sounds good. Any chance of having a pathway to fixing Windows (or MacOS) where forking is not possible?

Read more comments on GitHub >

github_iconTop Results From Across the Web

subprocess — Subprocess management — Python 3.11.1 ...
Run the command described by args. Wait for command to complete, then return a CompletedProcess instance. The arguments shown above are merely the...
Read more >
Subprocess launched in Uvicorn worker always returns zero ...
Is there any reason why Uvicorn's Gunicorn worker always return zero exit code from subprocess.Popen ? I know it is a weird thing...
Read more >
Always run a constant number of subprocesses in parallel
I want to use subprocesses to let 20 instances of a written script run parallel. Lets say i have a big list of...
Read more >
Usage of General and Iterating Splitter with Exception Handling
This blog describes how to configure exception handling in a splitter scenario. It describes the splitter in some sample scenarios using ...
Read more >
The subprocess Module: Wrapping Programs With Python
In this tutorial, you'll learn how to leverage other apps and programs that aren't Python, wrapping them or launching them from your Python ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found