Using --mem-fraction-static 0.95 alongside CUDA graphs and large batches
Activation buffers and FlashInfer workspaces need breathing room outside the static KV pool.
Operator task guide
SGLang separates RadixAttention prefix cache budgeting (--mem-fraction-static) from Tensor Parallel worker communication over ZMQ and NCCL. Startup OOMs typically mean weights plus static KV pool exceeded available GPU headroom or another process already occupies VRAM.
For multi-node inference across Docker or Kubernetes, pin identical lmsysorg/sglang Docker tags, mount large /dev/shm (--shm-size=16g or --ipc=host), pass matching --dist-init-addr and --node-rank flags, and enable --enable-metrics for Prometheus visibility.
Reviewed . Reference guidance is not a diagnosis of your workload.
Confirm the container sees all expected NVIDIA GPUs, has ample /dev/shm for NCCL/IPC, and is not sharing GPUs with leftover worker processes.
docker run --gpus all --shm-size=16g --rm lmsysorg/sglang:latest nvidia-smi
df -h /dev/shmIf SGLang fails with torch.OutOfMemoryError during RadixCache allocation or forward passes, inspect free VRAM vs --mem-fraction-static (default typically ~0.88) and test lowering --mem-fraction-static to 0.78 to 0.85 or capping --max-running-requests.
python3 -m sglang.launch_server \
--model-path YOUR_MODEL \
--tp 4 \
--mem-fraction-static 0.82 \
--enable-metricsOn multi-node deployments, ensure node 0 and worker nodes agree on --dist-init-addr, --nnodes, --node-rank, and NCCL_SOCKET_IFNAME, and verify port reachability before launch.
# Node 0
NCCL_SOCKET_IFNAME=eth0 python3 -m sglang.launch_server --model-path YOUR_MODEL --tp 16 --nnodes 2 --node-rank 0 --dist-init-addr 10.0.0.10:20000
# Node 1
NCCL_SOCKET_IFNAME=eth0 python3 -m sglang.launch_server --model-path YOUR_MODEL --tp 16 --nnodes 2 --node-rank 1 --dist-init-addr 10.0.0.10:20000When requests stall or return worker timeouts, run a diagnostic pass with NCCL_DEBUG=INFO and inspect whether a single rank hit a FlashInfer illegal memory access, host OOM kill, or P2P hang.
NCCL_DEBUG=INFO dmesg -T | grep -iE 'Killed process|NVRM: Xid'| Signal | What it means | Next action |
|---|---|---|
| torch.OutOfMemoryError during SGLang startup or batch execution | Static RadixCache fraction or activation peak exceeded free VRAM. | Check nvidia-smi for competing processes, lower --mem-fraction-static, or cap --max-running-requests. |
| SGLang NCCL error or timeout during TP/multi-node init | Mismatched --dist-init-addr, small /dev/shm, or broken PCIe P2P. | Verify port 20000 reachability, raise --shm-size, and test NCCL_DEBUG=INFO. |
| python not found or wrong interpreter in container | Container PATH differs from entrypoint python3. | Invoke python3 -m sglang.launch_server explicitly inside lmsysorg/sglang image. |
| FlashInfer illegal memory access on specific prompts | Attention backend kernel hit an edge-case shape or compile mismatch. | Test fallback attention backend flags and reproduce with CUDA_LAUNCH_BLOCKING=1. |
Activation buffers and FlashInfer workspaces need breathing room outside the static KV pool.
Docker bridge interfaces break cross-node NCCL rendezvous and cause silent timeouts.
Without --enable-metrics, Prometheus scrapes return 404 on /metrics.
Decode RadixAttention OOM, FlashInfer faults, and worker timeouts.
Compare RadixAttention, PagedAttention, and TensorRT failure surfaces.
Step-by-step multi-node NCCL recovery.
Fix SGLang torch.OutOfMemoryError cleanly.
Verify no other processes hold GPU VRAM, then lower --mem-fraction-static (for example from 0.88 to 0.80) or reduce --max-running-requests and --chunked-prefill-size.
The top causes are Docker default 64 MB /dev/shm (add --shm-size=16g or --ipc=host), wrong NCCL_SOCKET_IFNAME across multi-node hosts, or PCIe P2P blocked on non-NVLink GPUs.
Pass --enable-metrics to sglang.launch_server and scrape /metrics from Prometheus.
lmsysorg/sglang on Docker Hub provides prebuilt CUDA, FlashInfer, and PyTorch dependencies aligned for SGLang serving.
Get the likely cause, supporting evidence, and next safe steps with the same cloud reasoning used by paid plans. A crash the engine recognizes is answered in seconds, then checked by an independent AI review that updates this page when it finishes. A crash it does not recognize waits for the AI's own answer, which can take a few minutes. No account, card, or installation. Logs are masked at Denpex API ingress and are not saved to account history.
Before uploading, review cloud data handling and local options.
Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.
No credit card. No automatic subscription. See whether Denpex helps with an incident you already understand.
Up to 50 diagnoses a day for 30 days. Verify your work email to activate an eligible company evaluation, then replay a resolved incident and compare the evidence and next steps with your team's confirmed cause.
Use the three free diagnoses to review your error and relevant evidence. Keep reference guidance separate from the cause and recovery status of your own workload.
Diagnose your incident