Uvicorn worker processes die on startup when PYTHONDONTWRITEBYTECODE=1
#2396
-
To reproduce: export PYTHONDONTWRITEBYTECODE=1
uvicorn main:app --workers 2 I have tested this on Debian Bookworm. Might want to make sure you do not have any |
Beta Was this translation helpful? Give feedback.
Answered by
winstxnhdw
Jul 25, 2024
Replies: 2 comments 6 replies
-
@abersheeran Do you know something about this? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Can you provide more information? For example, Traceback |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
False alarm. I had
pyannote.audio
imported in one of the script that I forgot to comment out. This causes Uvicorn workers to die for whatever reason. Why this only happens whenworkers
are set to2
andPYTHONDONTWRITEBYTECODE=1
is a mystery, but at least it's not Uvicorn's problem.