Add a watch dog thread (#1816)
This commit is contained in:
@@ -74,6 +74,7 @@ class ServerArgs:
|
||||
api_key: Optional[str] = None
|
||||
file_storage_pth: str = "SGLang_storage"
|
||||
enable_cache_report: bool = False
|
||||
watchdog_timeout: float = 600
|
||||
|
||||
# Data parallelism
|
||||
dp_size: int = 1
|
||||
@@ -429,6 +430,12 @@ class ServerArgs:
|
||||
action="store_true",
|
||||
help="Return number of cached tokens in usage.prompt_tokens_details for each openai request.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--watchdog-timeout",
|
||||
type=float,
|
||||
default=ServerArgs.watchdog_timeout,
|
||||
help="Set watchdog timeout in seconds. If a forward batch takes longer than this, the server will crash to prevent hanging.",
|
||||
)
|
||||
|
||||
# Data parallelism
|
||||
parser.add_argument(
|
||||
|
||||
Reference in New Issue
Block a user