Troubleshooting

Common issues and their solutions when working with MynaDB.

Table Not Found

Error: "Table not found: mydb.default.cpu"

Causes

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

# Trigger compaction to improve query performance
curl -X POST http://localhost:7000/compact/mydb

Slow Writes

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

# 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:

  1. Check the server logs for detailed error messages
  2. Search GitHub Issues
  3. Open a new issue with reproduction steps