chore(deploy): add server native memory guards

This commit is contained in:
2026-06-24 16:38:41 +08:00
parent cabee634d4
commit 5518039792
3 changed files with 18 additions and 0 deletions
+9
View File
@@ -23,6 +23,15 @@ WEB_PORT=3010
SERVER_HTTP_PORT=3001
# easyai-server 后端 HTTP 端口
NODE_MAX_OLD_SPACE_SIZE=1536
# easyai-server V8 heap 上限,单位 MB
MALLOC_ARENA_MAX=2
# 限制 glibc native heap arena,降低 sharp/libvips 场景下 RSS 膨胀
SHARP_CACHE_ENABLED=false
# 默认关闭 sharp/libvips 全局 cache;需要开启时再配置 SHARP_CACHE_* 参数
SHARP_CONCURRENCY=1
# sharp/libvips 并发,8G 单机建议保持 1
# ws-gateway WebSocket 端口(统一作为对外访问映射端口使用)
CONFIG_WS_PORT=3002
# ws-gateway 容器内部 TCP 微服务监听地址(供 easyai-server 推送事件)