Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions java_codebase_rag/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ def run_cocoindex_update(
stdout="",
stderr=f"java_index_flow_lancedb.py not found under {bd}",
)
# Set CocoIndex concurrency limits to prevent "too many open files" error
# See: https://github.com/HumanBean17/java-codebase-rag/issues/293
env = env.copy()
env.setdefault("COCOINDEX_SOURCE_MAX_INFLIGHT_ROWS", "256")
cmd: list[str] = [str(exe), "update", COCOINDEX_TARGET]
if full_reprocess:
cmd.extend(["--full-reprocess", "-f"])
Expand Down
3 changes: 3 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ def _cocoindex_subprocess_env(project_root: Path) -> dict[str, str]:
idx = os.environ.get("JAVA_CODEBASE_RAG_INDEX_DIR", "").strip()
if idx:
sub_env["JAVA_CODEBASE_RAG_INDEX_DIR"] = str(Path(idx).expanduser().resolve())
# Set CocoIndex concurrency limits to prevent "too many open files" error
# See: https://github.com/HumanBean17/java-codebase-rag/issues/293
sub_env.setdefault("COCOINDEX_SOURCE_MAX_INFLIGHT_ROWS", "256")
return sub_env


Expand Down
Loading