Skip to content

fix: set COCOINDEX_SOURCE_MAX_INFLIGHT_ROWS=256 to prevent "too many open files" error#300

Merged
HumanBean17 merged 1 commit into
masterfrom
fix/too-many-open-files
Jun 8, 2026
Merged

fix: set COCOINDEX_SOURCE_MAX_INFLIGHT_ROWS=256 to prevent "too many open files" error#300
HumanBean17 merged 1 commit into
masterfrom
fix/too-many-open-files

Conversation

@HumanBean17

Copy link
Copy Markdown
Owner

Summary

  • Fixes Install error #2 #293 by setting COCOINDEX_SOURCE_MAX_INFLIGHT_ROWS=256 before invoking cocoindex
  • Prevents "Too many open files (os error 24)" error during indexing on systems with default OS file descriptor limits
  • Applied to both code paths: java_codebase_rag/pipeline.py and server.py

Root Cause

CocoIndex's default concurrency (1024 inflight rows) opens too many file handles simultaneously, exceeding OS file descriptor limits (typically 256-1024). This is not user error - even with fresh OS startup and single terminal window.

Changes

  • java_codebase_rag/pipeline.py: Set default in run_cocoindex_update()
  • server.py: Set default in _cocoindex_subprocess_env()

Test plan

  • Ruff checks pass
  • Existing tests pass
  • Users can verify fix resolves the indexing error

🤖 Generated with Claude Code

…open files" error

Fixes #293. Users experienced "Too many open files (os error 24)" during
indexing because CocoIndex's default concurrency (1024 inflight rows) opens
more file handles than OS limits allow (typically 256-1024).

Set COCOINDEX_SOURCE_MAX_INFLIGHT_ROWS=256 in both code paths that invoke
cocoindex (pipeline.run_cocoindex_update and server._cocoindex_subprocess_env).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@HumanBean17 HumanBean17 merged commit 08b81c8 into master Jun 8, 2026
1 check failed
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.

Install error #2

1 participant