sgl-project/sglang · error · ValueError
--asr-max-buffer-seconds must be positive (got {cfg.asr_max_
Error message
--asr-max-buffer-seconds must be positive (got {cfg.asr_max_buffer_seconds}). What it means
Raised by _handle_asr_validation when --asr-max-buffer-seconds is <= 0. This buffers streaming ASR (transcription) audio, so a non-positive buffer duration is meaningless and rejected before server start.
Source
Thrown at python/sglang/srt/server_args.py:9554
self._declare(
"_handle_dllm_inference",
disaggregation_mode="null",
)
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, dictView on GitHub (pinned to 0132848349)
Solutions
- Set a positive value, e.g. --asr-max-buffer-seconds 5.0
- If you meant minimal latency, use a small positive buffer like 0.5
Example fix
# before --asr-max-buffer-seconds 0 # after --asr-max-buffer-seconds 5.0
Defensive patterns
Strategy: validation
Validate before calling
if args.asr_max_buffer_seconds is not None:
assert args.asr_max_buffer_seconds > 0, 'asr_max_buffer_seconds must be > 0' Prevention
- Treat 0 as invalid for buffer/capacity knobs; there is usually no 'off' value
- Centralize CLI arg validation in a prelaunch check function
When it happens
Trigger: Launching with --asr-max-buffer-seconds 0 or a negative value while ASR/transcription features are configured.
Common situations: Trying to disable buffering by setting 0; typos or unit confusion (passing milliseconds where seconds expected).
Related errors
- --asr-max-concurrent-sessions must be positive (got {cfg.asr
- 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/47eb2f6735cf47da.
Report an issue: GitHub.