Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion server/docker-compose.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ configs:
host_ip = "host.docker.internal"
drop_capabilities = ["AUDIT_WRITE", "MKNOD", "NET_ADMIN", "NET_RAW", "SYS_ADMIN", "SYS_MODULE", "SYS_PTRACE", "SYS_TIME", "SYS_TTY_CONFIG"]
no_new_privileges = true
pids_limit = 512
# TODO: For production environments, it is recommended to set this to '4096' or higher to avoid
# "can't start new thread" errors when multiple sandboxes are running concurrently.
# See: https://github.com/alibaba/OpenSandbox/issues/447
pids_limit = 4096

[ingress]
mode = "direct"
Expand Down
5 changes: 4 additions & 1 deletion server/example.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ no_new_privileges = true
# Optional: set an AppArmor profile name (e.g., "docker-default") when AppArmor is enabled
apparmor_profile = ""
# Limit process count to reduce host impact from fork bombs; set to null to disable
pids_limit = 512
# TODO: For production environments, it is recommended to set this to '4096' or higher to avoid
# "can't start new thread" errors when multiple sandboxes are running concurrently.
# See: https://github.com/alibaba/OpenSandbox/issues/447
pids_limit = 4096
# Seccomp profile: empty string uses Docker default; set to an absolute path for a custom profile
seccomp_profile = ""

Expand Down
2 changes: 1 addition & 1 deletion server/example.config.zh.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ no_new_privileges = true
# Optional: set an AppArmor profile name (e.g., "docker-default") when AppArmor is enabled
apparmor_profile = ""
# Limit process count to reduce host impact from fork bombs; set to null to disable
# 生产环境建议设置为 4096 或更高,避免多沙箱并发时出现 "can't start new thread" 错误
# TODO: 生产环境建议设置为 4096 或更高,避免多沙箱并发时出现 "can't start new thread" 错误
# See: https://github.com/alibaba/OpenSandbox/issues/447
pids_limit = 4096
# Seccomp profile: empty string uses Docker default; set to an absolute path for a custom profile
Expand Down
2 changes: 1 addition & 1 deletion server/src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ class DockerConfig(BaseModel):
),
)
pids_limit: Optional[int] = Field(
default=512,
default=4096,
ge=1,
description="Maximum number of processes allowed per sandbox container. Set to null to disable the limit.",
)
Expand Down