{"record":{"id":"8607a73e14edf61f","repo":"sgl-project/sglang","slug":"enable-ssl-refresh-is-not-supported-with-enabl","errorCode":null,"errorMessage":"--enable-ssl-refresh is not supported with --enable-http2. Granian does not support SSL certificate hot-reloading. Use Uvicorn (the default) or handle certificate rotation externally.","messagePattern":"--enable-ssl-refresh is not supported with --enable-http2\\. Granian does not support SSL certificate hot-reloading\\. Use Uvicorn \\(the default\\) or handle certificate rotation externally\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/server_args.py","lineNumber":4364,"sourceCode":"            )\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                )\n\n    def _handle_multimodal(self):\n        \"\"\"Validate mm_process_config structure before model loading.\"\"\"\n        cfg = resolving_view(self)\n        if (\n            cfg.mm_preprocess_cache_size_mb is not None\n            and cfg.mm_preprocess_cache_size_mb < 0\n        ):\n            raise ValueError(\"mm_preprocess_cache_size_mb must be non-negative\")\n        if cfg.mm_process_config is not None:\n            if not isinstance(cfg.mm_process_config, dict):\n                raise TypeError(\n                    f\"mm_process_config must be a dict, \"\n                    f\"but got {type(cfg.mm_process_config)}\"","sourceCodeStart":4346,"sourceCodeEnd":4382,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/server_args.py#L4346-L4382","documentation":"SSL certificate hot-reloading is implemented for the default Uvicorn server and is not supported by granian (the HTTP/2 backend). SGLang rejects the combination --enable-ssl-refresh with --enable-http2 at startup.","triggerScenarios":"Passing both --enable-http2 and --enable-ssl-refresh on the command line or via env-derived args.","commonSituations":"Migrating an existing TLS deployment to HTTP/2 while keeping the rotation flags; templated launch scripts that always include refresh flags.","solutions":["Remove --enable-ssl-refresh when using --enable-http2, and rotate certificates externally (e.g. restart, or a fronting load balancer terminating TLS)","Or keep --enable-ssl-refresh and drop --enable-http2 to stay on Uvicorn","Or terminate TLS at an ingress/nginx that supports hot-reload and proxy plain HTTP to sglang"],"exampleFix":"# before\n--enable-http2 --enable-ssl-refresh --ssl-certfile c.pem --ssl-keyfile k.pem\n# after\n--enable-http2 --ssl-certfile c.pem --ssl-keyfile k.pem  # rotate externally","handlingStrategy":"validation","validationCode":"if args.enable_http2 and args.enable_ssl_refresh:\n    raise SystemExit('ssl-refresh is incompatible with http2; rotate certs externally')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep TLS termination in an ingress that supports rotation","Avoid templated flag sets that mix incompatible options"],"tags":["http2","ssl","certificate-rotation","incompatible-flags"],"backgroundTag":"incompatible-config-options","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}