You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/gateway/troubleshooting.md
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -454,6 +454,58 @@ Related:
454
454
-[Configuration](/gateway/configuration)
455
455
-[Doctor](/gateway/doctor)
456
456
457
+
## macOS gateway silently stops responding, then resumes when you touch the dashboard
458
+
459
+
Use this when channels (Telegram, WhatsApp, etc.) on a macOS host go quiet for minutes to hours at a time, and the gateway appears to come back the moment you open the Control UI, SSH in, or otherwise interact with the host. There is usually no obvious symptom in `openclaw status` because by the time you look the gateway is alive again.
- One or more `*-uncaught_exception.json` bundles in `~/.openclaw/logs/stability/` with `error.code` set to a transient network code such as `ENETDOWN`, `ENETUNREACH`, `EHOSTUNREACH`, or `ECONNREFUSED`.
471
+
-`pmset -g log` lines like `Entering Sleep state due to 'Maintenance Sleep'` or `en0 driver is slow (msg: WillChangeState to 0)` aligned with the crash timestamps. Power Nap / Maintenance Sleep briefly puts the Wi-Fi driver into state 0; any outbound `connect()` that lands in that window can fail with `ENETDOWN` even on a host that otherwise has full network connectivity.
472
+
-`launchctl print` output showing `state = not running` with multiple recent `runs` and an exit code, especially when the gap between crash and the next launch is on the order of an hour rather than seconds. macOS launchd applies an undocumented respawn-protection gate after a crash burst that can stop honoring `KeepAlive=true` until an external trigger such as interactive login, dashboard connection, or `launchctl kickstart` re-arms it.
473
+
474
+
Common signatures:
475
+
476
+
- A stability bundle whose `error.code` is `ENETDOWN` or a sibling code, with the call stack pointing into Node `net``lookupAndConnect` / `Socket.connect`. OpenClaw `2026.5.26` and newer classify these as benign transient network errors so they no longer propagate to the top-level uncaught handler; if you are on an older release, upgrade first.
477
+
- Long quiet periods that end the instant you connect to the Control UI or SSH into the host: the user-visible activity is what re-arms launchd's respawn gate, not anything the dashboard does to the gateway.
478
+
-`runs` count incrementing across the day with no corresponding `received SIG*; shutting down` line in `~/Library/Logs/openclaw/gateway.log`: clean shutdowns log a signal; transient crashes do not.
479
+
480
+
What to do:
481
+
482
+
1.**Upgrade the gateway** if you are running a release before `2026.5.26`. After upgrading, future `ENETDOWN` errors are logged as warnings instead of terminating the process.
483
+
2.**Reduce maintenance sleep activity** on Mac mini / desktop hosts that are meant to run as always-on servers:
This significantly reduces, but does not entirely eliminate, the underlying driver flap. The system can still perform some maintenance sleeps for TCP keepalive and mDNS upkeep regardless of these flags.
490
+
491
+
3.**Add a liveness watchdog** so a future crash burst that gets parked by launchd is caught quickly:
492
+
493
+
```bash
494
+
# Example launchd-aware liveness check, suitable for a 5-minute cron or LaunchAgent
The point is to externally re-arm the respawn gate; `KeepAlive=true` alone is not sufficient on macOS after a crash burst.
502
+
503
+
Related:
504
+
505
+
-[macOS platform notes](/platforms/macos)
506
+
-[Logging](/logging)
507
+
-[Doctor](/gateway/doctor)
508
+
457
509
## Gateway exits during high memory use
458
510
459
511
Use this when the Gateway disappears under load, the supervisor reports an OOM-style restart, or logs mention `critical memory pressure bundle written`.
Copy file name to clipboardExpand all lines: docs/platforms/macos.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,8 @@ Replace the label with `ai.openclaw.<profile>` when running a named profile.
47
47
If the LaunchAgent isn't installed, enable it from the app or run
48
48
`openclaw gateway install`.
49
49
50
+
If the gateway repeatedly disappears for minutes to hours and only resumes when you touch the Control UI or SSH into the host, see the troubleshooting note for macOS Maintenance Sleep / `ENETDOWN` crashes and launchd's respawn-protection gate in [Gateway troubleshooting](/gateway/troubleshooting#macos-gateway-silently-stops-responding-then-resumes-when-you-touch-the-dashboard).
51
+
50
52
## Node capabilities (mac)
51
53
52
54
The macOS app presents itself as a node. Common commands:
0 commit comments