Skip to main content

Common Issues

Out of Memory Errors

Symptom

Cause

Large repositories (10,000+ files) may exceed the default Node.js heap limit.

Solution

GitNexus automatically allocates 8GB heap on first run. If you still hit OOM: Option 1: Manual heap increase
Option 2: Skip embeddings Embeddings require significant memory. Analyze without them:
Option 3: Increase system swap On Linux/macOS, increase swap space for very large repos.

Prevention

  • Exclude large directories: Add to .gitignore before indexing
  • Skip generated files: Ensure dist/, build/, node_modules/ are ignored
  • Use embedding limit: Embeddings auto-skip for repos >50,000 nodes

Stale Index Warning

Symptom

Cause

Your repository has new commits since the last index. The knowledge graph may be out of sync with your code.

Solution

Option 1: Re-analyze (incremental)
This auto-detects changes and re-indexes only if the commit hash changed. Option 2: Force full re-index
Ignores staleness check and rebuilds from scratch.

Check Index Status

Shows:
  • Last indexed commit
  • Current commit
  • Number of nodes/edges
  • Index freshness

Parser Errors

Symptom

Cause

Tree-sitter may fail on:
  • Minified code (e.g., bundle.min.js)
  • Extremely large files (>10MB single file)
  • Syntax errors (incomplete or invalid code)
  • Unsupported language (file extension not recognized)

Solution

Option 1: Exclude problematic files Add to .gitignore:
Option 2: Fix syntax errors If the file has syntax errors, fix them first:
Option 3: Skip specific files GitNexus respects .gitignore. Add files you want to skip:

KuzuDB Errors

Symptom

Cause

  • Corrupted database (power loss, disk error)
  • Permission issues (can’t write to .gitnexus/)
  • Disk full (no space for database)

Solution

Option 1: Delete and re-index
Option 2: Check disk space
Ensure you have at least 2x your repo size in free space. Option 3: Check permissions
Ensure you own the directory:

Embedding Model Download Fails

Symptom

Cause

  • No internet connection
  • Firewall blocking Hugging Face
  • Disk full (model is ~90MB)

Solution

Option 1: Skip embeddings
You can still use all other features (search, context, impact). Option 2: Retry with embeddings
Option 3: Use VPN/proxy If Hugging Face is blocked:
Option 4: Manual model download Download model manually and place in cache:

MCP Server Not Responding

Symptom

  • Cursor/Claude shows “MCP server error”
  • Tools not available
  • “gitnexus not found”

Cause

  • Not installed globally (using npx is recommended)
  • Wrong config path
  • Server crashed

Solution

Option 1: Restart editor Close and reopen Cursor/Claude/Windsurf. Option 2: Check MCP config Verify config file exists:
Should contain:
Option 3: Run MCP server manually Test if the server starts:
Should output JSON-RPC messages. If it crashes, check the error. Option 4: Re-run setup
This auto-detects editors and writes the correct config.

”Repository not indexed” Error

Symptom

Cause

You’re trying to query a repo that hasn’t been indexed yet.

Solution

Option 1: Index the repo
Option 2: Check you’re in the right directory
Option 3: Check global registry
If the repo is missing, run gitnexus analyze again.

Slow Indexing Performance

Symptom

Indexing takes >10 minutes for a medium-sized repo (~1,000 files).

Cause

  • Slow disk (HDD vs SSD)
  • Many large files (e.g., 1MB+ source files)
  • CPU-bound (single-core or old CPU)
  • Embeddings enabled (adds significant time)

Solution

Option 1: Disable embeddings
Option 2: Exclude large directories Add to .gitignore:
Option 3: Use SSD Move repo to SSD for faster I/O. Option 4: Check CPU usage
If CPU is low, worker threads may not be starting. Check for errors.

Swift Parser Installation Fails

Symptom

Cause

tree-sitter-swift is an optional dependency that may fail on some platforms.

Solution

Option 1: Ignore it This is a warning, not an error. GitNexus will work for all other languages. Option 2: Install without optional dependencies
Option 3: Build Swift parser manually If you need Swift support:

Performance Tips

For Large Repositories

  1. Skip embeddings - Use default (no --embeddings flag)
  2. Exclude generated code - Add dist/, build/ to .gitignore
  3. Use SSD - Significantly faster than HDD
  4. Increase heap - Use NODE_OPTIONS="--max-old-space-size=16384"
  5. Run overnight - Very large repos (50,000+ files) may take hours

For Faster Queries

  1. Use specific queries - Narrow searches are faster than broad ones
  2. Leverage processes - Results grouped by execution flow
  3. Use context tool - More efficient than raw Cypher for symbol lookups
  4. Cache embeddings - Re-index without --force to reuse embeddings

For Web UI

  1. Use local backend - Run gitnexus serve for already-indexed repos
  2. Limit file selection - Don’t upload entire repos (use CLI instead)
  3. Use Chrome/Edge - WebGPU support for faster embeddings

Diagnostic Commands

Check Index Status

Shows:
  • Index freshness
  • Node/edge counts
  • Last indexed commit
  • Embedding status

List All Indexed Repos

Shows all repos in global registry.

Verify KuzuDB

Database size should be ~1-10MB per 1,000 files.

Test MCP Connection

Should output JSON-RPC init messages.

Clean Up and Reset

Delete Index for Current Repo

Removes .gitnexus/ directory and unregisters from global registry.

Delete All Indexes

Removes:
  • ~/.gitnexus/registry.json
  • All per-repo .gitnexus/ directories (requires confirmation)

Re-index from Scratch

Clear Embedding Model Cache


Debug Mode

Enable Verbose Logging

Shows:
  • Detailed pipeline progress
  • Parser stats
  • Memory usage
  • Worker thread activity

Inspect Database

Use KuzuDB CLI to inspect the graph:
Run Cypher queries:

Getting Help

GitHub Issues

Report bugs or request features: github.com/abhigyanpatwari/GitNexus/issues

Discussions

Ask questions or share tips: github.com/abhigyanpatwari/GitNexus/discussions

Discord

Join the community: Discord link in repo

Error Reference

Exit Codes

  • 0 - Success
  • 1 - General error (parse failure, disk error, etc.)
  • 130 - Interrupted (Ctrl+C)

Common Error Messages


Best Practices

Before Indexing

  1. Ensure .gitignore is clean - Exclude build artifacts
  2. Commit or stash changes - Cleaner index state
  3. Close other apps - Free up memory for large repos

After Indexing

  1. Verify status - Run gitnexus status
  2. Test MCP tools - Try query tool in your editor
  3. Re-index on major changes - After large refactors or branch switches

Regular Maintenance

  1. Re-index periodically - Run gitnexus analyze after big changes
  2. Check for updates - npm update -g gitnexus (if installed globally)
  3. Clean old indexes - Delete indexes for archived projects