-
-
Notifications
You must be signed in to change notification settings - Fork 754
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
Fix OSError occurs when workers > 1 #1317 #1443
Conversation
I am using python 3.8 with 3 workers on windows 10. Is there any more info on why it failed the test? |
No log available. So whats my next step? |
you can run the lint script in the scripts folder |
So I finally figured out how to run the lint script, so it should be good now. Sorry for the my ignorance. |
"The --reload flag should not be \ | ||
used in production on Windows." |
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.
"The --reload flag should not be \ | |
used in production on Windows." | |
"The --reload flag should not be " | |
"used in production on Windows." |
Is there something else I need to fix or does this look good? |
I'm going to check this tonight. |
This is basically a revert of #1257, which was in place to solve other issues... |
ok this one I dont get it, what is the purpose of the PR, please describe the issue |
The issue is #1317. On windows when running multiple workers without reload true you would get a oserror. By writing it this way you still provide the warning if reload is true but you no longer get the oserror. |
Is my statement false? |
I am assuming no your statement is not false but I am unsure of what issues the change fixed when it also created a new issue. I am currently home sick when I feel better I will dig into the code more to try to figure out the issue that this change fixed and see if I can recreate it. |
Hope you get better soon. 😟 |
So I have linked the log to show the errors I am getting without the above change. I am using a custom logger so [Backend] is actually the uvicorn channel. https://pastebin.com/cXQuG3SH |
I think #1454 is a better alternative, ymmv |
Thats cool too as long as it fixes the issue. |
Has anyone had a chance to review either of these and decide which fix you prefer? |
Any chance for a update on this issue? |
This solution reverts previous changes. As mentioned on #1220 (comment), we should use the The ideal solution here would be to just make that check. I think we can even check if we're running on a child process instead of passing the As a note, the warning saying that reload should not be used in production is misplaced. It's not because we got to that point that we are in production. The warning should be removed. In any case, I'll be closing this because of what I said on the first paragraph. Let's continue this on #1454 . Thanks for the efforts here @smitchell6879 ! 🙇 References: |
Should fix OSError