fix: raise inotify limits to prevent gateway EMFILE crashes - #182
Conversation
The OpenClaw gateway runs several file watchers (skills/workspace, config reload, MEMORY.md). Jetson's stock inotify ceilings (128 instances / 65536 watches) can be exhausted under load and surface as "EMFILE: too many open files" crashes and gateway restart loops. Persist higher limits via /etc/sysctl.d/99-clawbox-inotify.conf (instances 512, watches 524288) in setup-optimizations.sh. The apply is best-effort and guarded so it can't fail the install inside CI/containers where /proc/sys is read-only. Verified on a real Jetson: limits raise from 128/65536 to 512/524288. Closes #160
|
Warning Review limit reached
More reviews will be available in 33 minutes and 32 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. β How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. π¦ How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. βΉοΈ Review infoβοΈ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: π Files selected for processing (1)
β¨ Finishing Touchesπ§ͺ Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem (#160)
The OpenClaw gateway runs several file watchers β skills/workspace, config reload,
MEMORY.md. On Jetson the stock inotify ceilings are low (max_user_instances=128,max_user_watches=65536), and under load they exhaust βEMFILE: too many open filesduring watch setup, which crashes the gateway and drives a restart loop (the reporter sawNRestarts=8+dbus-daemon: Cannot initialize inotify).There was no inotify tuning anywhere in
scripts//install.sh.Fix
setup-optimizations.shnow persists higher limits via/etc/sysctl.d/99-clawbox-inotify.conf(instances 512, watches 524288) and applies them. The apply is best-effort and guarded (|| true) so it can't fail the install inside the e2e-install container where/proc/sysis read-only.Verification
bash -nclean.128 β 512and65536 β 524288. (The live box was at 42/128 instances at idle β now mitigated.)Note: this is the device-side mitigation; the watcher-count root cause is upstream OpenClaw.
Closes #160