← back to Wallco Ai
pm2: ecosystem.wallco-ai-9878.config.js with restart-loop guards
4f3993de9b94e9355f2b5882c5eecb3e32fd6709 · 2026-05-26 08:35:57 -0700 · Steve Abrams
External SIGINTs (suspected: parallel claude sessions running pm2 restart
concurrently) were causing wallco-ai-9878 to restart ~10x in 8m (status
online, exit code 0 via signal SIGINT — not a crash). The original pm2
entry was ad-hoc started with no restart limits, so each SIGINT respawned
unconditionally.
This file applies min_uptime=60s + max_restarts=5 + restart_delay=5s.
SIGINTs spaced >60s apart still succeed cleanly (counter resets);
tight-loop SIGINTs cap at 5 and pm2 leaves the process DOWN, surfacing
the trigger instead of hiding it as churn.
Apply via: pm2 delete wallco-ai-9878 && pm2 start ecosystem.wallco-ai-9878.config.js
Files touched
A ecosystem.wallco-ai-9878.config.js
Diff
commit 4f3993de9b94e9355f2b5882c5eecb3e32fd6709
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue May 26 08:35:57 2026 -0700
pm2: ecosystem.wallco-ai-9878.config.js with restart-loop guards
External SIGINTs (suspected: parallel claude sessions running pm2 restart
concurrently) were causing wallco-ai-9878 to restart ~10x in 8m (status
online, exit code 0 via signal SIGINT — not a crash). The original pm2
entry was ad-hoc started with no restart limits, so each SIGINT respawned
unconditionally.
This file applies min_uptime=60s + max_restarts=5 + restart_delay=5s.
SIGINTs spaced >60s apart still succeed cleanly (counter resets);
tight-loop SIGINTs cap at 5 and pm2 leaves the process DOWN, surfacing
the trigger instead of hiding it as churn.
Apply via: pm2 delete wallco-ai-9878 && pm2 start ecosystem.wallco-ai-9878.config.js
---
ecosystem.wallco-ai-9878.config.js | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/ecosystem.wallco-ai-9878.config.js b/ecosystem.wallco-ai-9878.config.js
new file mode 100644
index 0000000..071c9fd
--- /dev/null
+++ b/ecosystem.wallco-ai-9878.config.js
@@ -0,0 +1,33 @@
+// Companion pm2 config for the live editor instance running on port 9878.
+// Adds restart-loop guards (min_uptime + max_restarts + restart_delay) so an
+// external SIGINT storm — e.g. parallel claude sessions running `pm2 restart`
+// concurrently — can't churn the process indefinitely.
+//
+// SIGINTs spaced >60s apart still succeed (cron reload pattern); a tight
+// loop of SIGINTs <60s apart will be capped at 5 and pm2 will stop respawning,
+// surfacing the trigger instead of hiding it as background churn.
+
+module.exports = {
+ apps: [{
+ name: 'wallco-ai-9878',
+ script: 'server.js',
+ cwd: __dirname,
+ exec_mode: 'fork',
+
+ // restart-loop guards
+ min_uptime: '60s',
+ max_restarts: 5,
+ restart_delay: 5000,
+ autorestart: true,
+
+ // env (server.js also reads .env via dotenv — these override)
+ env: {
+ NODE_ENV: 'production',
+ PORT: '9878',
+ HOST: '0.0.0.0',
+ BIND: '0.0.0.0',
+ },
+
+ max_memory_restart: '800M',
+ }],
+};
← 50fe0af scripts: --start/--count CLI flags on geometric-block-leaves
·
back to Wallco Ai
·
cleanup: exempt pil-* generators from bleed_guard + delete d a5384f5 →