We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db8047c commit b4bcda2Copy full SHA for b4bcda2
src/_bentoml_impl/server/proxy.py
@@ -1,5 +1,6 @@
1
from __future__ import annotations
2
3
+import asyncio
4
import contextlib
5
import logging
6
import typing as t
@@ -98,7 +99,11 @@ async def lifespan(
98
99
finally:
100
if proc is not None:
101
proc.terminate()
- await proc.wait()
102
+ try:
103
+ await asyncio.wait_for(proc.wait(), timeout=30.0)
104
+ except asyncio.TimeoutError:
105
+ proc.kill()
106
+ await proc.wait()
107
108
assert service.has_custom_command(), "Service does not have custom command"
109
app = fastapi.FastAPI(lifespan=lifespan)
0 commit comments