In our cluster, we accidentally discovered the zombie process. We found the reason. Uvicorn's new process manager will JOIN child processes one by one after sending all exit signals. When the previous child process does not exit for a long time, the subsequent child processes cannot be JOIN.
I noticed that Uvicorn has an inherent shutdown timeout, which would be nice if we could use it with a multiprocessor.
Summary
About https://github.com/encode/uvicorn/discussions/2369
In our cluster, we accidentally discovered the zombie process. We found the reason. Uvicorn's new process manager will JOIN child processes one by one after sending all exit signals. When the previous child process does not exit for a long time, the subsequent child processes cannot be JOIN.
I noticed that Uvicorn has an inherent shutdown timeout, which would be nice if we could use it with a multiprocessor.
The reason why we don't use terminate&join sequentially is to kill all processes faster, as mentioned in this PR https://github.com/encode/uvicorn/pull/2010
Checklist