HelperScripts-for-ProxmoxVE/misc
CanbiZ (MickLesk) fdab25b098
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
2026-04-23 22:17:25 +02:00
..
images remove old files and assets (#9991) 2025-12-15 17:37:26 +01:00
alpine-install.func core: APT/APK Mirror Fallback for CDN Failures (#13316) 2026-03-26 16:53:04 +01:00
alpine-tools.func core/tools: replace generic return 1 exit_codes with more specific exit_codes (#13311) 2026-03-26 16:07:38 +01:00
api.func core: fix some pct create issues (telemetry) + cleanup (#13810) 2026-04-17 15:19:52 +02:00
build.func core: improve system update information / lxc stack upgrade (#13970) 2026-04-23 20:52:59 +02:00
cloud-init.func core/tools: replace generic return 1 exit_codes with more specific exit_codes (#13311) 2026-03-26 16:07:38 +01:00
core.func Revert "core: Add PHS_VERBOSE env var to skip verbose mode prompts (#13797)" (#13963) 2026-04-23 15:30:38 +02:00
error_handler.func core: auto-size NODE_OPTIONS heap (#13960) 2026-04-23 22:17:25 +02:00
install.func APT Proxy: Support full URLs (http/https with custom ports) (#13474) 2026-04-03 21:17:07 +02:00
tools.func core: auto-size NODE_OPTIONS heap (#13960) 2026-04-23 22:17:25 +02:00
vm-core.func Add donate & script page badges to descriptions (#13596) 2026-04-08 21:40:52 +02:00