sgl-project/sglang · error · ValueError
--asr-max-concurrent-sessions must be positive
Error message
--asr-max-concurrent-sessions must be positive (got {cfg.asr_max_concurrent_sessions}). What it means
server_args validation: --asr-max-concurrent-sessions must be a positive integer; the configured value (shown in the message) was zero or negative. It caps simultaneous ASR sessions, so at least 1 is required.
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
- Decode context parallel size (--dcp-size /…
- --default-chat-template-kwargs must decode to a JSON object
- Invalid modality ' ' in --limit-mm-data-per-request.Allowed…
- --mamba-max-states-per-path must be -1 (unlimited) or a…
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/271466b06a1530fc.
Report an issue: GitHub.
Appendix: 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)