-
Notifications
You must be signed in to change notification settings - Fork 2.2k
UI /api/layout drops connection for large graph when max_nodes is high #726
Copy link
Copy link
Open
Labels
awaiting-reporterWaiting on the reporter for info/repro; stale bot will warn then closeWaiting on the reporter for info/repro; stale bot will warn then closebugSomething isn't workingSomething isn't workingpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.stability/performanceServer crashes, OOM, hangs, high CPU/memoryServer crashes, OOM, hangs, high CPU/memoryux/behaviorDisplay bugs, docs, adoption UXDisplay bugs, docs, adoption UX
Milestone
Description
Metadata
Metadata
Assignees
Labels
awaiting-reporterWaiting on the reporter for info/repro; stale bot will warn then closeWaiting on the reporter for info/repro; stale bot will warn then closebugSomething isn't workingSomething isn't workingpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.stability/performanceServer crashes, OOM, hangs, high CPU/memoryServer crashes, OOM, hangs, high CPU/memoryux/behaviorDisplay bugs, docs, adoption UXDisplay bugs, docs, adoption UX
Summary
The graph UI fails for a large indexed private repository. Indexing succeeds and CLI/MCP graph queries work, but opening the project in the browser UI causes
/api/layoutto hang and then drop the connection without a JSON error response.This appears isolated to the browser UI layout endpoint, not the core indexer.
Environment
codebase-memory-mcp --version:0.8.1http://127.0.0.1:9749Project size
The indexed private project is roughly:
list_projectsandget_architecturework for this project.Reproduction
After indexing a large project, open it in the graph UI, or call the layout endpoint directly:
curl -v 'http://127.0.0.1:9749/api/layout?project=<large-private-project>&max_nodes=50000'Observed result:
In Chrome, the graph page shows:
The request hangs for roughly 20-35 seconds before the connection is dropped. The local UI process then restarts if supervised externally.
Threshold observed locally
These returned successfully:
These failed or caused the UI server connection to be dropped:
The bundled frontend appears to request
max_nodes=50000when loading a graph.Expected behavior
For large projects, the UI should ideally do one of the following:
max_nodes,Notes
I intentionally redacted the repository name, local paths, and project-specific identifiers because this was reproduced against a private codebase. Happy to provide more diagnostics if there is a safe way to collect them without exposing source or project details.