Skip to content

fix(gateway): limit chokidar watch depth to avoid fd exhaustion#310

Open
BingqingLyu wants to merge 2 commits intomainfrom
fork-pr-41655-fix-chokidar-depth-41606
Open

fix(gateway): limit chokidar watch depth to avoid fd exhaustion#310
BingqingLyu wants to merge 2 commits intomainfrom
fork-pr-41655-fix-chokidar-depth-41606

Conversation

@BingqingLyu
Copy link
Copy Markdown
Owner

@BingqingLyu BingqingLyu commented Apr 27, 2026

Fixes openclaw#41606

  • Problem: Chokidar watchers (memory + skills) recurse into huge dirs (e.g. memory/ with node_modules), creating 9k+ FSEventWrap handles and exhausting FDs → spawn EBADF in embedded gateway.
  • Fix: Add depth: 2 to both watchers to limit recursion.

…entWrap)

Add depth: 2 to memory and skills watchers so workspace dirs with large
trees (e.g. node_modules under memory/) do not create 9k+ FSEventWrap
handles and trigger spawn EBADF in embedded gateway.

Refs openclaw#41606

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Memory/skills chokidar watcher can exhaust FDs (FSEventWrap) when watched dirs have many files

2 participants