Deployment and upgradesOfficial documentation8 min readDeployment and upgrades

FastGPT Sandbox Environment Variable Changes for 4.15.03 Upgrade

Sandbox Environment Variable Updates The 4.15.03 FastGPT self-host upgrade adds security, resource limit, and request queuing controls for the code sandbo…

Sandbox Environment Variable Updates The 4.15.03 FastGPT self-host upgrade adds security, resource limit, and request queuing controls for the code sandbox environment. These changes improve operational stability and reduce SSRF risk for network requests originating from sandboxed code execution. Two core new capabilities are included: configurable security and resource limits for sandbox operations, and grouped request queuing via the queueId parameter for run APIs.

Full Environment Variable Reference The complete list of sandbox-related environment variables, with their default values and official descriptions, is provided below:

VariableDefaultDescription
SANDBOX_API_MAX_BODY_MB8Maximum /sandbox API JSON body size, including variables, in MB.
SANDBOX_MAX_OUTPUT_MB10Maximum output JSON size for one code execution, including return values and logs, in MB.
CHECK_INTERNAL_IPtrueEnables internal IP checks for sandbox network requests by default to reduce SSRF risk.
SANDBOX_MAX_TIMEOUT60000Timeout for one code execution, in milliseconds.
SANDBOX_MAX_MEMORY_MB256Memory limit for one sandbox, in MB. The runtime reserves an extra 50 MB for overhead.
SANDBOX_POOL_SIZE20Number of pre-warmed JS/Python workers.
SANDBOX_REQUEST_MAX_COUNT30Maximum number of network requests allowed during one code execution.
SANDBOX_REQUEST_TIMEOUT60000Timeout for one network request from inside the sandbox, in milliseconds.
SANDBOX_REQUEST_MAX_RESPONSE_MB10Maximum response body size for one sandbox network request, in MB.
SANDBOX_REQUEST_MAX_BODY_MB5Maximum request body size for one sandbox network request, in MB.
SANDBOX_QUEUE_ID_CONCURRENCYEmptyNumber of requests with the same queueId that may enter execution at once. Empty disables queueing.

Queueing Configuration The new queueId parameter supports grouped request queuing for run APIs. The SANDBOX_QUEUE_ID_CONCURRENCY variable defines the maximum number of concurrent requests that share a queueId and are allowed to enter sandbox execution. If this variable is left unset, the request queuing feature is completely disabled.

Source: FastGPT official source

Applicability and version scope

Use this page for the documented Deployment and upgrades scenario. Confirm the FastGPT, dependency, API, and deployment versions in the official source before applying a change.

Safety guardrails

Use [REDACTED_CREDENTIAL] for credentials and private data. Confirm the documented environment and version before review.

Rollback guidance

Restore the prior technical-content authority snapshot. Restore saved configuration and data snapshots, then repeat the smallest verification scenario.