Troubleshooting Guide
This guide covers common issues encountered when operating ArcherDB and provides step-by-step resolution procedures.
Quick Diagnosis
Use this table to quickly identify and resolve common issues:
| Symptom | Likely Cause | Quick Fix |
|---|---|---|
| 503 on /health/ready | Not yet synced after start | Wait 30s for replica to sync, check logs for progress |
| 503 persists after 60s | Failed to join cluster | Check network connectivity between replicas |
| High P99 latency (>100ms) | Compaction backlog | Increase compaction_threads to 3, check disk I/O |
| Connection refused | Server not running or wrong port | Verify systemctl status archerdb, check port
binding |
| “cluster ID mismatch” | Client configured for wrong cluster | Update client cluster_id to match server |
| “max clients reached” | Connection limit hit | Check clients_max for your tier (lite/standard=64,
pro=128, enterprise/ultra=256), close idle connections |
| TTL cleanup removes 0 | TTL not configured on events | Events must have ttl_seconds > 0 when inserted |
| Replica lag growing | Follower disk too slow | Check iostat on lagging replica, upgrade to NVMe |
| Memory usage growing | Entity count exceeds plan | Check entity count vs capacity, scale or archive data |
| View changes frequent | Network instability | Check packet loss between replicas with
ping -c 100 |
| IndexDegraded alert | RAM index at capacity | Increase ram_index_capacity or scale horizontally |
| Disk fill prediction | Write rate exceeds capacity | Enable TTL, archive old data, or expand storage |
For alert-specific runbooks, see:
- Replica Down Runbook - Critical replica failure
deploy/prometheus/rules.yaml- All alert definitions
Table of Contents
- Quick Diagnosis
- How to Use This Guide
- Connection Issues
- Performance Issues
- Cluster Issues
- Query Issues
- Replication Issues
- Data Protection Issues
- Diagnostic Commands
How to Use This Guide
Quick Resolution
Each issue follows a consistent format:
- Symptom: What you observe
- Possible Causes: Likely root causes ranked by frequency
- Resolution: Step-by-step fix for each cause
- Prevention: How to avoid this issue in the future
When to Escalate
Escalate to senior support or engineering if:
- The issue persists after following all resolution steps
- You observe data corruption or inconsistency
- Multiple unrelated symptoms appear simultaneously
- The issue requires cluster-wide downtime to resolve
Log Locations
| Component | Log Location | Format |
|---|---|---|
| ArcherDB (systemd) | journalctl -u archerdb |
Structured JSON or text |
| ArcherDB (manual) | stdout/stderr | Structured JSON or text |
| Metrics | localhost:9090/metrics |
Prometheus format |
| Health | localhost:9090/health/detailed |
JSON |
For log format configuration, see --log-format and
--log-level options.
Connection Issues
Connection Refused
Symptom: Client receives “connection refused” error when connecting to ArcherDB.
Possible Causes:
- Server not running
- Wrong port number
- Firewall blocking the port
- Binding to wrong network interface
Resolution:
Check if server is running:
systemctl status archerdb # Or pgrep -f archerdbIf not running, start it:
systemctl start archerdbVerify listening port:
ss -tlnp | grep archerdb # Or netstat -tlnp | grep 3000Ensure ArcherDB is listening on the expected port.
Check firewall rules:
# Linux (iptables) iptables -L -n | grep 3000 # Linux (firewalld) firewall-cmd --list-ports # Cloud: Check security groups/firewall rules in consoleVerify bind address:
# Check config or command line for --bind option # Default: 0.0.0.0 (all interfaces)
Prevention: Use monitoring to alert on server unavailability. Configure health checks in load balancers.
Connection Timeout
Symptom: Client connections hang and eventually timeout.
Possible Causes:
- Network routing issues
- DNS resolution failure
- Load balancer misconfiguration
- Server overloaded
Resolution:
Test network connectivity:
# From client machine ping node1 telnet node1 3000 nc -zv node1 3000Verify DNS resolution:
nslookup node1 dig node1Check load balancer health:
# Verify backend health in LB dashboard # Check LB logs for connection errorsCheck server load:
curl -s localhost:9090/metrics | grep archerdb_connections_active curl -s localhost:9090/metrics | grep process_open_fds
Prevention: Implement connection timeouts in clients. Monitor connection counts and latency.
Cluster ID Mismatch
Symptom: Client receives “cluster ID mismatch” error.
Possible Causes:
- Client configured with wrong cluster ID
- Connecting to wrong cluster
- Data file from different cluster
Resolution:
Check server cluster ID:
./archerdb info /data/archerdb.db | grep cluster # Or check startup logs for "cluster_id"Update client configuration:
# Ensure cluster_id matches server client = ArcherDBClient( addresses=["node1:3000"], cluster_id=12345 # Must match server )If data file is wrong: Restore from external snapshot/archive or re-format with correct cluster ID.
Prevention: Store cluster IDs in configuration management. Use separate DNS names per cluster.
Gateway TLS Handshake Failed
Symptom: Connection fails with TLS/SSL handshake error at gateway/proxy boundary.
Possible Causes:
- Certificate expired
- Hostname mismatch
- CA certificate not trusted
- Protocol/cipher mismatch in gateway or service mesh
Resolution:
Check certificate expiry in gateway/proxy:
openssl x509 -in /path/to/cert.pem -noout -datesIf expired, rotate certificates (see Certificate Rotation).
Verify hostname/SAN matches exposed endpoint:
openssl x509 -in /path/to/cert.pem -noout -text | grep -A1 "Subject Alternative Name"Test TLS endpoint directly:
openssl s_client -connect node1:3000 -CAfile /path/to/ca.pemCheck TLS version/cipher compatibility: Ensure client and gateway/proxy settings are aligned.
Prevention: Monitor certificate expiry dates. Automate rotation in gateway/mesh control plane. Keep TLS policy managed centrally.
Performance Issues
High Latency (P99 > 100ms)
Symptom: Request latency exceeds acceptable thresholds.
Possible Causes:
- Disk I/O saturation
- Compaction running
- Large batch sizes causing queuing
- Insufficient memory for block cache
Resolution:
Check disk I/O:
iostat -x 1 5 # Look for %util > 80% or high await timesIf disk saturated, consider faster storage (NVMe).
Check for active compaction:
curl -s localhost:9090/metrics | grep archerdb_compaction_active curl -s localhost:9090/metrics | grep archerdb_compaction_write_ampCompaction is normal but can cause latency spikes. See LSM Tuning.
Reduce batch sizes: Large batches (>5000 events) can cause queuing delays. Optimal range: 500-2000.
Check memory pressure:
curl -s localhost:9090/metrics | grep process_resident_memory_bytes free -hIf memory constrained, increase RAM or reduce entity count.
Prevention: Monitor P99 latency trends. Set up alerts at 50ms (warning) and 100ms (critical).
Low Throughput
Symptom: Insert or query rate lower than expected.
Possible Causes:
- Connection pool too small
- Batch sizes too small
- Client-side bottleneck
- Network bandwidth limit
Resolution:
Increase connection pool:
client = ArcherDBClient( addresses=["node1:3000"], pool_size=10 # Increase from default )Increase batch sizes:
batch = client.create_batch() # Add 1000-5000 events per batch instead of small batches for event in events: batch.add(event) batch.commit()Profile client application: Ensure client isn’t CPU-bound processing results.
Check network throughput:
iperf3 -c node1 -p 5201
Prevention: Benchmark during capacity planning. Monitor throughput metrics over time.
High Memory Usage
Symptom: Memory usage approaching limits, potential OOM.
Possible Causes:
- RAM index grown beyond capacity plan
- Memory leak (rare)
- Large query result sets in memory
Resolution:
Check entity count vs. capacity:
curl -s localhost:9090/metrics | grep archerdb_entities_total # Compare to capacity planSee Capacity Planning for sizing.
Check index load factor:
curl -s localhost:9090/metrics | grep archerdb_index_load_factor # Should be < 0.7 for optimal performanceRestart if memory keeps growing (potential leak):
systemctl restart archerdb # Monitor if issue recurs
Prevention: Set resource limits. Monitor memory usage with alerts at 70% and 85%.
Disk Usage Growing
Symptom: Disk usage continuously increasing.
Possible Causes:
- TTL not configured
- Compaction falling behind
- High update rate creating versions
Resolution:
Check if TTL is configured:
./archerdb info /data/archerdb.db | grep ttlConsider enabling TTL for automatic cleanup.
Check compaction status:
curl -s localhost:9090/metrics | grep archerdb_lsm_levels curl -s localhost:9090/metrics | grep archerdb_compactionIf levels accumulating, compaction may be behind.
Manual compaction:
./archerdb compact /data/archerdb.db
Prevention: Configure TTL appropriate for use case. Monitor disk usage trends.
Cluster Issues
Cluster Won’t Form Quorum
Symptom: Replicas don’t elect a primary; cluster unavailable.
Possible Causes:
- Network partition between replicas
- Clock skew too large
- Data corruption preventing startup
- Wrong cluster configuration
Resolution:
Test network connectivity between replicas:
# From each node, test others for node in node1 node2 node3; do echo "Testing $node" nc -zv $node 3000 doneCheck clock synchronization:
chronyc tracking # Or timedatectl status # Clock skew should be < 100msIf skewed, fix NTP:
systemctl restart chronydVerify data file integrity:
./archerdb verify /data/archerdb.dbIf corrupted, see Disaster Recovery.
Check configuration consistency: Ensure all replicas use same
--addresseslist and--clusterID.
Prevention: Monitor clock skew and network connectivity. Use consistent configuration management.
Frequent View Changes
Symptom: archerdb_view_changes_total
incrementing frequently.
Possible Causes:
- Network instability
- Disk I/O latency causing heartbeat timeouts
- Resource exhaustion (CPU/memory)
Resolution:
Check network stability:
# Test packet loss between replicas ping -c 100 node2 | grep "packet loss"Check disk latency:
iostat -x 1 5 # Check await column - should be < 10ms for SSDCheck resource usage:
top -p $(pgrep archerdb) curl -s localhost:9090/metrics | grep process_
Prevention: Use stable network infrastructure. Monitor view change rate. Alert on > 3 changes per 5 minutes.
Replica Falling Behind
Symptom: One replica’s
archerdb_replication_lag_ms consistently high.
Possible Causes:
- Slow disk on follower
- Network congestion to follower
- Follower under-resourced
Resolution:
Check disk performance on lagging replica:
ssh lagging-node "iostat -x 1 5"Check network path:
iperf3 -c lagging-node -p 5201 mtr lagging-nodeCompare resources: Ensure lagging replica has same CPU/RAM/disk spec as others.
Prevention: Use homogeneous hardware. Monitor replication lag per replica.
Split Brain Suspected
Symptom: Concern about split brain after network partition.
Possible Causes: This is not possible with ArcherDB’s Viewstamped Replication (VSR) protocol.
Explanation:
- VSR requires a majority (2 of 3, 3 of 5) to commit any operation
- During a partition, only one partition can have a majority
- The minority partition cannot accept writes (returns
cluster_unavailable) - When the partition heals, the minority automatically catches up
Resolution:
Verify cluster state:
# Check each replica's view number for node in node1 node2 node3; do echo -n "$node view: " ssh $node "curl -s localhost:9090/metrics | grep archerdb_view_number" doneAll healthy replicas should have the same view number.
If partitioned now, identify majority: The partition accepting writes has quorum. Wait for network to heal.
Prevention: Use reliable network infrastructure. Monitor view numbers across replicas.
Query Issues
Radius Query Returns No Results
Symptom: Radius query returns empty results when data expected.
Possible Causes:
- Coordinate encoding mismatch (degrees vs. nanodegrees)
- Query area actually empty
- Wrong group ID filter
- Data not yet replicated
Resolution:
Verify coordinate encoding:
# ArcherDB uses nanodegrees internally # SDK should handle conversion, but verify: lat = 37.7749 # degrees lat_nano = 37774900000 # nanodegrees (lat * 1e9)Check with broader query:
# Expand radius to verify data exists results = client.query_radius( center_lat=37.7749, center_lon=-122.4194, radius_m=100000 # 100km to find any nearby data )Verify group ID:
# Try without group filter results = client.query_radius(..., group_id=None)Check if data committed: Recent inserts may not be queryable until committed (milliseconds).
Prevention: Add unit tests for coordinate encoding. Log query parameters.
Polygon Query Rejects Input
Symptom: Polygon query returns “invalid polygon” error.
Possible Causes:
- Wrong winding order (exterior must be counter-clockwise)
- Self-intersecting polygon
- Too few vertices (minimum 4 for closed ring)
- Holes with wrong winding order (must be clockwise)
Resolution:
Check winding order:
# Exterior ring: counter-clockwise # Holes: clockwise exterior = [ (-122.4, 37.7), # Start (-122.3, 37.7), # Go counter-clockwise (-122.3, 37.8), (-122.4, 37.8), (-122.4, 37.7), # Close the ring ]Check for self-intersection: Use a GIS tool or library to validate the polygon.
Verify ring closure: First and last vertex must be identical.
Prevention: Validate polygons before querying. Use well-known-text (WKT) validation libraries.
Results Seem Incomplete
Symptom: Query returns fewer results than expected.
Possible Causes:
- Result limit reached (default: 1000)
- Pagination required
- Filter excluding data (group_id, time range)
Resolution:
Check for pagination:
results = client.query_radius(...) all_events = results.events while results.has_more: results = client.query_radius(..., cursor=results.cursor) all_events.extend(results.events) print(f"Total: {len(all_events)}")Increase limit if needed:
results = client.query_radius(..., limit=10000) # Max: 10000Remove filters to test: Try query without group_id or time constraints.
Prevention: Always handle pagination in client code. Log result counts.
Replication Issues
S3 Log Shipping Failing
Symptom: S3 log-shipping uploads failing;
archerdb_replication_state shows degraded.
Possible Causes:
- Invalid credentials
- Bucket permissions
- Network connectivity to S3
- S3 service outage
Resolution:
Check credentials:
# Verify AWS credentials aws sts get-caller-identity # Test S3 access aws s3 ls s3://your-bucket/Check bucket policy: Ensure IAM role/user has
s3:PutObject,s3:GetObject,s3:ListBucket.Test network connectivity:
curl -I https://s3.amazonaws.com # Or your regional endpointCheck spillover directory:
ls -la /data/spillover/ # Files here indicate S3 writes are queued
Prevention: Use IAM roles (not keys) on EC2. Monitor replication state metric. Set up S3 bucket notifications.
Replication Lag High
Symptom:
archerdb_replication_lag_seconds consistently elevated.
Possible Causes:
- S3 throttling
- Network bandwidth limitation
- High write volume
Resolution:
Check for S3 throttling:
# Check S3 metrics in CloudWatch for 503 errors aws cloudwatch get-metric-statistics \ --namespace AWS/S3 \ --metric-name 5xxErrors \ --dimensions Name=BucketName,Value=your-bucketCheck upload bandwidth:
curl -s localhost:9090/metrics | grep archerdb_replication_bytesConsider S3 Transfer Acceleration or multi-region setup.
Prevention: Use appropriate S3 tier. Monitor replication lag with alerts at 30s and 2min.
Spillover Files Growing
Symptom: Files accumulating in spillover directory.
Possible Causes:
- S3 outage or prolonged failure
- Credentials expired
- Network partition to S3
Resolution:
Check S3 connectivity:
aws s3 ls s3://your-bucket/Check credential expiry: For IAM roles, ensure instance profile is attached.
Monitor spillover directory:
du -sh /data/spillover/ ls -lt /data/spillover/ | headWhen S3 recovers: Spillover files are automatically uploaded in order. Monitor until directory empties.
Prevention: Alert on spillover directory size. Use multiple S3 regions for redundancy.
Data Protection Issues
ArcherDB expects encryption-at-rest and key operations to be managed by storage/cloud infrastructure.
Storage Encryption Policy Drift
Symptom: Security scans report unencrypted volumes/snapshots.
Possible Causes:
- New volume created outside policy
- Snapshot replication policy disabled
- Wrong storage class or account defaults
Resolution:
- Verify encryption settings on active data volumes and snapshots.
- Recreate non-compliant resources with enforced encryption policy.
- Re-run restore drill from compliant snapshot set.
External Key Service Issues
Symptom: Platform tooling reports KMS/key policy failures.
Possible Causes:
- KMS connectivity or endpoint policy issue
- IAM permissions drift
- Key disabled/deleted
Resolution:
- Validate key accessibility with platform tooling.
- Restore least-privilege IAM/key policies from IaC baseline.
- Ensure restore pipeline can access required keys before recovery exercises.
Diagnostic Commands
Health Checks
# Quick health check
curl -s localhost:9090/health/live
# Returns: {"status":"ok"}
# Readiness check
curl -s localhost:9090/health/ready
# Returns: {"status":"ready"} or {"status":"not_ready","reason":"..."}
# Detailed health with component status
curl -s localhost:9090/health/detailed | jq .
# Returns component-level health: replica, memory, storage, replicationMetrics Inspection
# All metrics
curl -s localhost:9090/metrics
# Specific metric patterns
curl -s localhost:9090/metrics | grep archerdb_request_duration
curl -s localhost:9090/metrics | grep archerdb_replication
curl -s localhost:9090/metrics | grep archerdb_compaction
curl -s localhost:9090/metrics | grep process_
# Current connections
curl -s localhost:9090/metrics | grep archerdb_connections
# Entity count
curl -s localhost:9090/metrics | grep archerdb_entities_totalLog Analysis
# Recent errors
journalctl -u archerdb --since "1 hour ago" | grep -i error
# View changes
journalctl -u archerdb | grep -i "view change"
# Replication events
journalctl -u archerdb | grep -i "replication"
# Connection events
journalctl -u archerdb | grep -i "connection"
# JSON log parsing (if using JSON format)
journalctl -u archerdb -o cat | jq 'select(.level == "error")'Data File Verification
# Verify data file integrity
./archerdb verify /data/archerdb.db
# Show data file info
./archerdb info /data/archerdb.db
# Check disk usage
du -sh /data/archerdb.db
df -h /dataCluster Status
# Cluster health
./archerdb status --addresses=node1:3000,node2:3000,node3:3000
# Check which replica is primary
curl -s localhost:9090/metrics | grep archerdb_replica_role
# 1 = primary, 0 = follower
# View number (should match across replicas)
curl -s localhost:9090/metrics | grep archerdb_view_numberGetting Help
When the troubleshooting steps above don’t resolve your issue, follow these steps to get help.
Collecting Diagnostic Information
Before reaching out, collect the following:
# 1. System information
uname -a
cat /etc/os-release
# 2. ArcherDB version
./archerdb --version
# 3. Configuration (redact sensitive values)
cat /etc/archerdb/config.yaml | grep -v password | grep -v key
# 4. Recent logs (last 1000 lines)
journalctl -u archerdb --since "30 minutes ago" | tail -1000 > archerdb-logs.txt
# 5. Metrics snapshot
curl -s localhost:9090/metrics > archerdb-metrics.txt
# 6. Health check details
curl -s localhost:9090/health/detailed | jq . > archerdb-health.json
# 7. Cluster state (if multi-node)
for i in 0 1 2; do
echo "=== Node $i ===" >> cluster-state.txt
curl -s node$i:9090/metrics | grep -E "archerdb_(view|replica|replication)" >> cluster-state.txt
doneWhat to Include in Bug Reports
When opening a GitHub issue, include:
- Environment: OS, ArcherDB version, hardware specs (CPU, RAM, disk type)
- Configuration: Cluster size, relevant config settings
- Reproduction steps: Exact sequence to reproduce the issue
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Logs: Relevant log snippets (redact sensitive data)
- Metrics: Relevant metric values at time of issue
Support Channels
| Channel | Best For | Response Time |
|---|---|---|
| GitHub Issues | Bug reports, feature requests | Community: 1-7 days |
| GitHub Discussions | Questions, best practices | Community: 1-3 days |
| Documentation | Self-service troubleshooting | Immediate |
Emergency Procedures
For production emergencies:
- Data loss suspected: Stop writes, capture external snapshot, preserve logs
- Cluster unavailable: Check quorum (need 2/3 or 3/5 replicas)
- Security incident: Isolate affected nodes, preserve evidence, rotate credentials
See Disaster Recovery for emergency procedures.
Related Documentation
- Operations Runbook - Operational procedures
- Disaster Recovery - Recovery procedures
- Error Codes Reference - Complete error code list
- Capacity Planning - Sizing guidance
- LSM Tuning - Storage performance tuning
- Performance Tuning - Optimization guide