feat: add OpenClaw automated self-healing script to mitigate port collisions
This commit is contained in:
14
README.md
14
README.md
@@ -37,3 +37,17 @@ A native executable installer for Linux (x64).
|
||||
- **Runtime:** Built around Electron v41.1.1
|
||||
- **Packaging:** Bundled using Go `embed` to bypass traditional deployment toolchain limitations (like Wine).
|
||||
- **Silent Mode:** Installers execute completely in the background without requiring user interaction (No Next/Finish wizards).
|
||||
|
||||
## OpenClaw Automated Self-Healing Engine
|
||||
|
||||
Included in this repository is `openclaw-healer.sh`, a robust background daemon script designed to mitigate headless browser crashes and port deadlocks commonly encountered when automating OpenClaw or Puppeteer.
|
||||
|
||||
### What it does:
|
||||
1. **Zombie Reaping:** Continuously scans for and aggressively reaps `[Z] Defunct` instances of Chrome, Chromium, and Puppeteer by terminating their deadlocked parent processes.
|
||||
2. **Port Mitigation:** Monitors target ports (default `18800`) for stalled processes. If a process holds the port for longer than 120 seconds, the healer executes a forced termination (`kill -15` then `kill -9`) to guarantee the port is released for the next automation task.
|
||||
|
||||
### How to run it:
|
||||
```bash
|
||||
chmod +x openclaw-healer.sh
|
||||
nohup bash -c "while true; do ./openclaw-healer.sh; sleep 60; done" > /var/log/openclaw-healer.log 2>&1 &
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user