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

serve: Handle case where server subprocess times out #49233

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tools/serve/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,11 @@ def run(config_cls=ConfigBuilder, route_builder=None, mp_context=None, log_handl
server.wait(timeout=1)
if server.proc.exitcode == 0:
logger.info('Status of subprocess "%s": exited correctly', server.proc.name)
elif server.proc.exitcode is None:
logger.warning(
'Status of subprocess "%s": shutdown timed out',
server.proc.name)
failed_subproc += 1
else:
subproc = server.proc
logger.warning('Status of subprocess "%s": failed. Exit with non-zero status: %d',
Expand Down