Troubleshooting
Common issues and their solutions when running ChronDB.
Startup Issues
Port Already in Use
java.net.BindException: Address already in useAnother process is using the port. Check which process holds it and either stop that process or change the ChronDB port:
# Find what's using port 3000
lsof -i :3000
# Run ChronDB on different ports
clojure -M:run 8080 6380Or disable unused protocols:
clojure -M:run --disable-redis --disable-sqlOut of Memory on Startup
java.lang.OutOfMemoryError: Java heap spaceChronDB needs enough memory for the Lucene index and Git operations. Increase JVM heap:
java -Xmx2g -jar chrondb.jarFor Docker deployments, ensure the container memory limit matches the JVM heap:
Configuration File Not Found
ChronDB looks for config.edn in the current directory by default. Specify the path explicitly:
Storage Issues
Git Lock Files
A previous ChronDB process crashed or was killed without releasing Git locks. Remove stale lock files:
ChronDB automatically detects and removes lock files older than 60 seconds on startup. If you see this error during normal operation, it may indicate concurrent processes accessing the same data directory. Only one ChronDB instance should use a given data directory.
Disk Space Exhausted
Every write creates a Git commit. Over time, history accumulates. To reclaim space:
Monitor disk usage proactively:
The /health endpoint reports disk space status. Configure alerts for when free disk drops below 5 GB.
Corrupted Git Repository
If the Git repository is corrupted (e.g., due to a hard crash during a write):
If repair fails, restore from a backup:
Always maintain regular backups. See the Operations Guide for backup procedures.
Index Issues
Lucene Index Corruption
If the Lucene index is corrupted, ChronDB can rebuild it from the Git repository. The background reindexing process runs automatically on startup. To force a full reindex:
Stop ChronDB
Delete the index directory (default:
data/index/or the configured index path)Restart ChronDB — the reindexer will rebuild the index from Git commits
Monitor reindexing progress in the logs:
Search Returns Stale Results
The Lucene Near-Real-Time (NRT) reader refreshes automatically after writes. If search results seem stale:
Check that the write operation completed successfully (no errors in logs)
Check the
chrondb_wal_pending_entriesmetric — a high value means writes are queuedIf using remote sync, the document may not have been pulled yet
Protocol-Specific Issues
REST API: Connection Refused
Verify ChronDB is running: check the process and logs
Verify the REST protocol is enabled in
config.edn(or not disabled via--disable-rest)Check if it's bound to the correct interface (default
0.0.0.0accepts all)Check health:
curl http://localhost:3000/healthz
Redis: Authentication Error
ChronDB's Redis protocol does not currently support AUTH commands. If your Redis client requires authentication, configure it to connect without a password, or use a proxy that handles authentication.
PostgreSQL: Connection Error
Verify the PostgreSQL protocol is enabled and the port is correct
Use the configured username and password:
Check that
config.ednhas the PostgreSQL server enabled:
PostgreSQL: Unsupported SQL Feature
ChronDB implements a subset of SQL. See Protocols for the complete list of supported SQL features. Common limitations:
No subqueries (yet)
No window functions (yet)
No HAVING clause (yet)
Only INNER JOIN and LEFT JOIN supported
Performance Issues
Slow Read Operations
If GET operations are slow:
Check document count — read performance degrades with repository size because of path resolution overhead. This is a known limitation (see issue #109).
Check disk I/O — Git operations are I/O bound. Use SSDs for the data directory.
Check memory — insufficient memory forces the JVM to GC frequently. Monitor with
/health:
Slow Queries
If SQL queries or search operations are slow:
Check the query — ChronDB currently loads all documents for a table before filtering (see issue #115). Avoid
SELECT *on large tables when possible.Use targeted queries — queries that match indexed fields (via Lucene) are faster than full table scans.
Limit results — always use
LIMITin SQL queries andlimitparameter in search.Check index health — the
chrondb_index_documentsgauge should match your expected document count.
High Memory Usage
Check for large WAL backlogs:
chrondb_wal_pending_entriesshould be near 0Check for many concurrent connections:
chrondb_active_connectionsRun compaction to optimize Git storage:
java -jar chrondb.jar --command compactConsider increasing the JVM heap if usage is consistently above 85%
Diagnostic Tools
ChronDB includes built-in diagnostic tools:
Repository Diagnostics
This checks:
Git repository integrity
Lock file presence
Branch configuration
Remote sync status
Data Dump
WAL Status
Check the Write-Ahead Log for pending or failed operations:
A healthy WAL should show "pending-entries": 0. Values above 100 indicate the WAL is backing up, which may mean storage is slow or experiencing errors.
Getting Help
If your issue is not covered here:
Check the FAQ for common questions
Search existing issues
Open a new issue with:
ChronDB version
Operating system and Java version
Full error message and stack trace
Steps to reproduce
Join the discussions for questions
Last updated
Was this helpful?