Troubleshooting
Common issues and their solutions when working with MynaDB.
Table Not Found
Error: "Table not found: mydb.default.cpu"
Causes
- Data hasn't been flushed to disk yet
- Wrong table name or database
- Data was written to a different schema
Solutions
# 1. Flush data to disk
curl -X POST http://localhost:7000/flush
# 2. List available tables
curl http://localhost:7000/tables/mydb
# 3. Check if using correct database in URL
curl 'http://localhost:7000/query/mydb' -d 'SELECT * FROM cpu'
# ^^^^^ make sure this matches
No Data Returned
Query returns empty results
Solutions
# 1. Check if data exists
curl 'http://localhost:7000/query/mydb' -d 'SELECT COUNT(*) FROM cpu'
# 2. Check table schema
curl http://localhost:7000/schema/mydb/cpu
# 3. Verify column names in WHERE clause
curl 'http://localhost:7000/query/mydb' -d 'SELECT * FROM cpu LIMIT 1'
# 4. Check time range - timestamps are nanoseconds
curl 'http://localhost:7000/query/mydb' -d 'SELECT MIN(time), MAX(time) FROM cpu'
Connection Issues
Error: "Connection refused"
Solutions
# 1. Check if server is running
ps aux | grep mynadb
# 2. Check port availability
netstat -tlnp | grep 7000
# 3. Check server logs
journalctl -u mynadb -f
# 4. Test health endpoint
curl http://localhost:7000/health
Performance Issues
Slow Queries
- Add LIMIT - Always use LIMIT for exploratory queries
- Filter early - Use WHERE on timestamp and indexed tags
- Check compaction - Too many small files slow down queries
# Trigger compaction to improve query performance
curl -X POST http://localhost:7000/compact/mydb
Slow Writes
- Batch writes - Send multiple points in one request
- Increase flush interval if durability allows
- Check disk I/O - Use SSD storage
Disk Space Issues
Running Low on Disk
# 1. Check disk usage
du -sh /data/stats/*
# 2. Manually delete old partitions
curl -X POST http://localhost:7000/retention/mydb/default/cpu \
-H "Content-Type: application/json" \
-d '{"older_than_days": 7}'
# 3. Trigger compaction (reduces file count and size)
curl -X POST http://localhost:7000/compact/mydb
Memory Issues
Out of Memory (OOM)
Solutions
- Reduce
full_compaction_max_concurrentin config - Lower cache flush interval to reduce memory usage
- Add LIMIT to large queries
- Use streaming with Arrow Flight for large results
# config.toml - reduce memory usage
[compaction]
full_compaction_max_concurrent = 1 # Lower this
[cache]
flush_interval_secs = 15 # Flush more frequently
Common Mistakes
| Mistake | Solution |
|---|---|
SELECT * FROM mydb.cpu |
Use mydb.default.cpu or just cpu |
| Forgetting to flush | Call /flush before querying new data |
| Wrong timestamp format | Use nanoseconds (19 digits) |
| Missing database in URL | Use /query/mydb not /query |
Getting Help
If you can't resolve your issue:
- Check the server logs for detailed error messages
- Search GitHub Issues
- Open a new issue with reproduction steps