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

  1. Set a positive integer, e.g. --asr-max-concurrent-sessions 8
  2. 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

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


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/271466b06a1530fc. Report an issue: GitHub.