Skip to content

Commit bb05efd

Browse files
aksOpsclaude
andcommitted
fix: reduce enrich batch size to 500 to avoid Neo4j memory pool limit
Adding prop_* properties to nodes (framework, http_method, auth_type, etc.) increased per-node data 3-4x. With 140K nodes at batch size 2000, the UNWIND transaction exceeded Neo4j's memory pool limit. Reduced node and edge batch size from 2000 to 500. Matches the default indexing batch size and avoids memory issues on large codebases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 163d800 commit bb05efd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/io/github/randomcodespace/iq/cli/EnrichCommand.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ private int enrichFromCache(AnalysisCache cache, Path root, NumberFormat nf, Ins
175175
}
176176

177177
// Bulk-load nodes in batches using UNWIND
178-
int nodeBatchSize = 2000;
178+
// Smaller batches to avoid Neo4j memory pool limit (nodes carry prop_* properties)
179+
int nodeBatchSize = 500;
179180
int nodesLoaded = 0;
180181
int totalNodes = enrichedNodes.size();
181182
for (int i = 0; i < totalNodes; i += nodeBatchSize) {
@@ -263,7 +264,7 @@ private int enrichFromCache(AnalysisCache cache, Path root, NumberFormat nf, Ins
263264
validEdgeMaps.add(props);
264265
}
265266

266-
int edgeBatchSize = 2000;
267+
int edgeBatchSize = 500;
267268
int edgesLoaded = 0;
268269
int totalEdges = validEdgeMaps.size();
269270
CliOutput.info(" Loading " + nf.format(totalEdges) + " edges...");

0 commit comments

Comments
 (0)