{"record":{"id":"c114fff32cbb21a5","repo":"sgl-project/sglang","slug":"http2-max-concurrent-streams-must-be-between-1-a","errorCode":null,"errorMessage":"--http2-max-concurrent-streams must be between 1 and 4294967295.","messagePattern":"--http2-max-concurrent-streams must be between 1 and 4294967295\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/server_args.py","lineNumber":4350,"sourceCode":"        if cfg.ssl_certfile and not os.path.isfile(cfg.ssl_certfile):\n            raise ValueError(\n                f\"SSL certificate file not found: '{cfg.ssl_certfile}'. \"\n                f\"Please check the --ssl-certfile path.\"\n            )\n        if cfg.ssl_ca_certs and not os.path.isfile(cfg.ssl_ca_certs):\n            raise ValueError(\n                f\"SSL CA certificates file not found: '{cfg.ssl_ca_certs}'. \"\n                f\"Please check the --ssl-ca-certs path.\"\n            )\n        if cfg.enable_ssl_refresh and not (cfg.ssl_certfile and cfg.ssl_keyfile):\n            raise ValueError(\n                \"--enable-ssl-refresh requires --ssl-certfile and --ssl-keyfile \"\n                \"to be specified.\"\n            )\n\n        if cfg.enable_http2:\n            if not 0 < cfg.http2_max_concurrent_streams < 2**32:\n                raise ValueError(\n                    \"--http2-max-concurrent-streams must be between 1 and \"\n                    \"4294967295.\"\n                )\n\n            try:\n                import granian  # noqa: F401\n            except ImportError:\n                raise ValueError(\n                    \"--enable-http2 requires the 'granian' package. \"\n                    'Install it with: pip install \"sglang[http2]\"'\n                )\n\n            if cfg.enable_ssl_refresh:\n                raise ValueError(\n                    \"--enable-ssl-refresh is not supported with --enable-http2. \"\n                    \"Granian does not support SSL certificate hot-reloading. \"\n                    \"Use Uvicorn (the default) or handle certificate rotation externally.\"\n                )","sourceCodeStart":4332,"sourceCodeEnd":4368,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/server_args.py#L4332-L4368","documentation":"When HTTP/2 is enabled via --enable-http2, SGLang validates that --http2-max-concurrent-streams falls in the valid HTTP/2 protocol range (1 to 2^32-1). Values of 0, negative numbers, or values >= 4294967296 are rejected.","triggerScenarios":"Starting the server with --enable-http2 and --http2-max-concurrent-streams set to 0, a negative number, or >= 2**32. Validated in _handle_ssl_validation before startup.","commonSituations":"Tuning copied from another proxy/server with different limits; accidentally passing 0 meaning 'unlimited'; unit confusion (e.g. passing bytes-like large numbers).","solutions":["Set the value to a sane positive number, e.g. --http2-max-concurrent-streams 256","If unsure, omit the flag to use the default","Double-check scripts/env files for a stale 0 or negative override"],"exampleFix":"# before\n--enable-http2 --http2-max-concurrent-streams 0\n# after\n--enable-http2 --http2-max-concurrent-streams 256","handlingStrategy":"validation","validationCode":"if args.enable_http2:\n    assert 0 < args.http2_max_concurrent_streams < 2**32, 'streams out of range'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate numeric ranges in config generation","Never use 0 to mean unlimited here"],"tags":["http2","server-args","configuration-validation"],"backgroundTag":"config-value-out-of-range","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}