Troubleshooting Guide
Common issues and solutions for BetterDB Monitor.
Connection Issues
“Connection refused” error
Symptoms: BetterDB cannot connect to your Valkey/Redis instance.
Solutions:
- Verify the host is reachable:
ping your-valkey-host - Check the port is open:
nc -zv your-valkey-host 6379 - If using Docker, ensure network connectivity:
- Use
--network hostfor localhost connections - Or use the container’s IP/hostname on the Docker network
- Use
- Verify credentials if ACL is enabled
“NOAUTH Authentication required”
Symptoms: Connection fails with authentication error.
Solutions:
- Set
DB_PASSWORDenvironment variable - If using ACL with username: set both
DB_USERNAMEandDB_PASSWORD - Verify credentials work with CLI:
valkey-cli -h host -p port -a password PING
Storage Issues
“STORAGE_URL is required for PostgreSQL storage”
Symptoms: App fails to start with PostgreSQL storage type.
Solutions:
- Ensure
STORAGE_URLis set when usingSTORAGE_TYPE=postgres - Format:
postgresql://user:password@host:port/database - Verify PostgreSQL is accessible from the container
“SQLite storage is not available in this build”
Symptoms: Cannot use SQLite storage in Docker.
Solutions:
- SQLite is excluded from Docker builds for size optimization
- Use
STORAGE_TYPE=postgresorSTORAGE_TYPE=memoryinstead - SQLite is only available for local development (
pnpm dev)
Docker Issues
Container marked as unhealthy
Symptoms: docker ps shows container as unhealthy.
Solutions:
- Check if the app started:
docker logs betterdb-monitor - Verify port mapping matches PORT env var
- Health check expects response at
/healthendpoint - Wait for start period (5 seconds) to complete
“Port already in use”
Symptoms: Container fails to start due to port conflict.
Solutions:
- Change the port:
-p 8080:8080 -e PORT=8080 - Find what’s using the port:
lsof -i :3001 - Stop conflicting service or use different port
Prometheus/Metrics Issues
Metrics endpoint returns empty
Symptoms: /prometheus/metrics returns minimal data.
Solutions:
- Wait for first poll cycle (metrics populate after ~5 seconds)
- Verify database connection is healthy
- Check logs for polling errors
Missing Valkey-specific metrics
Symptoms: betterdb_commandlog_* metrics not appearing.
Explanation: Valkey-specific metrics only populate when:
- Connected to Valkey (not Redis)
- The specific feature is available for that version
- Data exists (e.g., COMMANDLOG has entries)
Getting Help
If your issue isn’t listed here:
- Check the GitHub Issues for similar problems
- Open a new issue with:
- BetterDB version
- Database type and version
- Error messages and logs
- Steps to reproduce
- For urgent issues, email support@betterdb.com