sgl-project/sglang · error · ValueError
--asr-max-concurrent-sessions must be positive (got {cfg.asr
Error message
--asr-max-concurrent-sessions must be positive (got {cfg.asr_max_concurrent_sessions}). What it means
Raised by _handle_asr_validation when --asr-max-concurrent-sessions is <= 0. It caps concurrent ASR sessions; zero or negative values are invalid and rejected at startup validation.
Source
Thrown at python/sglang/srt/server_args.py:9559
if cfg.enable_mixed_chunk:
logger.warning(
"Mixed chunked prefill is disabled because of using diffusion LLM inference."
)
self._declare(
"_handle_dllm_inference",
enable_mixed_chunk=False,
)
def _handle_asr_validation(self):
"""Validate transcription/ASR-specific server args."""
cfg = resolving_view(self)
if cfg.asr_max_buffer_seconds <= 0:
raise ValueError(
f"--asr-max-buffer-seconds must be positive "
f"(got {cfg.asr_max_buffer_seconds})."
)
if cfg.asr_max_concurrent_sessions <= 0:
raise ValueError(
f"--asr-max-concurrent-sessions must be positive "
f"(got {cfg.asr_max_concurrent_sessions})."
)
def _validate_prefill_decode_interval(self):
cfg = resolving_view(self)
if cfg.prefill_decode_interval < 0:
raise ValueError("--prefill-decode-interval must be non-negative.")
def _handle_other_validations(self):
cfg = resolving_view(self)
if cfg.default_chat_template_kwargs is not None and not isinstance(
cfg.default_chat_template_kwargs, dict
):
raise ValueError(
"--default-chat-template-kwargs must decode to a JSON object"
)
View on GitHub (pinned to 0132848349)
Solutions
- Set a positive integer, e.g. --asr-max-concurrent-sessions 8
- Omit the flag to use the default if unsure
Example fix
# before --asr-max-concurrent-sessions 0 # after --asr-max-concurrent-sessions 8
Defensive patterns
Strategy: validation
Validate before calling
if args.asr_max_concurrent_sessions is not None:
assert args.asr_max_concurrent_sessions > 0, 'asr_max_concurrent_sessions must be > 0' Prevention
- Remember 0 does not mean unlimited for this flag; omit it instead
- Lint generated configs for non-positive capacity settings
When it happens
Trigger: Launching with --asr-max-concurrent-sessions 0 or negative.
Common situations: Setting 0 intending 'unlimited' (not supported); minimal deployments copied from examples with edited values.
Related errors
- --asr-max-buffer-seconds must be positive (got {cfg.asr_max_
- Decode context parallel size (--dcp-size / --decode-context-
- --mamba-max-states-per-path must be -1 (unlimited) or a posi
- --swa-full-tokens-ratio should be in range (0, 1.0].
- --prefill-decode-interval must be non-negative.
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/271466b06a1530fc.
Report an issue: GitHub.