sgl-project/sglang

[Feature] Increase server payload size limit

Open

#6,622 opened on May 26, 2025

View on GitHub
 (9 comments) (1 reaction) (3 assignees)Python (6,216 forks)auto 404
good first issue

Repository metrics

Stars
 (28,442 stars)
PR merge metrics
 (Avg merge 2d 1h) (1,000 merged PRs in 30d)

Description

Checklist

Motivation

[Feature Request] Increase payload size limit for base64 images

Problem

Sending 10MB JSON with base64-encoded images to SGLang server fails with "payload reached size limit".

curl -X POST http://server:58000/v1/chat/completions -H "Content-Type: application/json" -d @base64.json
# Error: payload reached size limit

Request

Add configuration option to increase payload size limit, such as:

  • --max-payload-size flag
  • Environment variable support

Why needed

  • Avoid setting up NFS/file servers for multi-machine image sharing
  • Enable self-contained requests with multiple images
  • Simplify deployment in distributed environments

Current workaround

Store images in shared folder + use URLs (requires additional infrastructure setup)

Related resources

No response

Contributor guide