mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-19 23:25:02 +00:00
core: auto-size NODE_OPTIONS heap (#13960)
* feat(nodejs): auto-size NODE_OPTIONS heap and apply in Termix updates - setup_nodejs now sets NODE_OPTIONS only when not already set - Heap size is auto-derived from NODE_MAX_OLD_SPACE_SIZE, var_ram, or MemTotal - Auto heap is clamped to 1024..4096 MB to avoid too-small or too-large defaults - Termix update path now calls setup_nodejs before frontend/backend builds so Node heap defaults are applied consistently during updates * feat(error-handler): add actionable Node.js heap OOM guidance Detect probable Node.js heap out-of-memory failures from log patterns and common build exit codes, then print targeted remediation hints instead of only a generic SIGABRT/SIGKILL message. - Detect OOM patterns in last log lines (Reached heap limit, JS heap OOM) - Treat node build contexts with exit 134/137/243 as likely heap issues - Suggest computed --max-old-space-size based on NODE_OPTIONS, var_ram, or MemTotal (clamped to 1024..4096 MB) - Recommend calling setup_nodejs before build steps so defaults apply * refactor(node-heap): raise auto cap to 12GB and simplify OOM hint - Increase setup_nodejs auto heap clamp from 4GB to 12GB for heavy frontend builds - Keep lower bound at 1GB and preserve user override precedence - Simplify error_handler Node OOM output to a single concise hint - Align error_handler heap suggestion clamp to 12GB
This commit is contained in:
committed by
GitHub
parent
c3c544d5a4
commit
fdab25b098
@@ -155,6 +155,8 @@ EOF
|
||||
/opt/termix/nginx/client_body
|
||||
msg_ok "Recreated Directories"
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Building Frontend"
|
||||
cd /opt/termix
|
||||
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||
|
||||
Reference in New Issue
Block a user