Skip to content

Troubleshooting

Avinash Gupta edited this page Oct 18, 2026 · 1 revision

Troubleshooting

Start with the two commands that catch most problems:

rdstail validate -c rdstail.yaml --deep   # credentials, instances, sinks, state store
rdstail discover -c rdstail.yaml          # exactly which databases will be tailed

Then turn up logging: RDSTAIL_LOGGING__LEVEL=debug rdstail run -c rdstail.yaml.

Nothing is being shipped

Check Why
Is new data being written? With start_from: end (the default), rdstail ships only lines written after it first sees an instance. A quiet database ships nothing. Use rdstail tail --since 1h to see what exists.
rdstail discover shows your databases? Discovery tags are AND-ed; exclude_tags may match; an engine: on the source filters discovery. Log line: discovery matched no instances.
Does the engine log what you expect? Default RDS settings don't log statements. See Security Detections.
Is the sink filtered? filter.min_severity drops records without a severity (continuation lines, slow-log entries).
rdstail_dlq_depth > 0? The sink is failing and batches are parked: rdstail dlq list -c ….

Permission errors

AccessDenied on an RDS or S3 call: attach the policy from rdstail iam-policy -c rdstail.yaml. Common misses:

  • rds:DescribeEvents: needed since 0.4.0 for restart/failover detection
  • kms:GenerateDataKey: the bucket uses SSE-KMS
  • sts:AssumeRole: cross-account assume_role on a source or sink, or the member account's trust policy doesn't trust the rdstail role
  • SCPs or permission boundaries in AWS Organizations overriding the role's policy

Containers on EC2 with no credentials found: IMDSv2 needs hop limit 2 (aws ec2 modify-instance-metadata-options --http-put-response-hop-limit 2).

Throttling / growing latency

Log line AWS API throttling; backing off, metric rdstail_api_calls_total{outcome="throttled"} rising. The per-account + region budget (~14 calls/s) is used up. Lengthen poll_interval, set poll_interval_max, and look for other consumers of the RDS log API. Nothing is lost; only latency grows. See Scaling.

One database falls behind

A single log file is growing faster than the RDS API can serve it (~0.3–0.9 MB/s). It's usually general_log, log_statement = all, or a slow log with long_query_time = 0. Reduce at the source; for catch-up use parallel_reads_per_file. See Performance.

Sink errors

Symptom Cause / fix
HTTP 413 → DLQ Batch larger than the receiver accepts. Lower runtime.max_batch_bytes / max_batch_records, leaving ~1 MB headroom
HTTP 401/403 → DLQ Token wrong or unset. An unset ${VAR} is sent literally as ${VAR}
Kafka message too large Raise topic max.message.bytes to ≥ 2 MB (multi-line records reach ~1 MiB)
S3 AccessDenied on PutObject Bucket policy, KMS key policy, or the prefix in IAM doesn't match the sink's prefix
Fix applied, data still parked rdstail dlq replay -c …. Replay never runs automatically

State store

Symptom Cause / fix
database is locked / slow checkpoints State on a network filesystem (NFS/EFS), or two processes sharing one file. Use local disk, one file per process
Permission denied on state.db The service user can't write the directory. In containers, mount the volume where the nonroot user (uid 65532) can write
Old version can't start after upgrade The state schema migrated. Restore the pre-upgrade backup to roll back (Upgrades)
state.db keeps growing Set runtime.checkpoint_retention: 168h or run rdstail state gc

Log messages

What rdstail's WARN/ERROR messages mean:

Message Meaning Action
AWS API throttling; backing off Over the API budget see Throttling
discovery matched no instances Discovery selected nothing check tags/region/engine with rdstail discover
log file keeps growing but its marker does not advance; no data is being read stall anomaly: RDS returns no data for a growing file usually transient; if it persists, restart and open an issue with debug logs
log hours purged by RDS before they were read; data lost gap anomaly: RDS rotated MySQL hours away before rdstail read them (it was down too long, or far behind) keep rdstail running and caught up: RDS keeps rotated MySQL hours only for a limited time
database restart/failover detected; re-verifying log positions Reboot or Multi-AZ failover none; rdstail re-reads around the restart and skips already-shipped lines
log file shrank or server restarted; re-reading recent data, skipping already-shipped lines Same recovery, detected from file size none
log line exceeds RDS's 1 MB response limit; shipped truncated A single line > 1 MB the record has truncated: true; RDS can't serve the rest
drain file failed / poll error An API or sink call failed read err; retried on the next poll

Platform quirks

  • macOS "cannot be opened": xattr -d com.apple.quarantine rdstail.
  • Duplicates downstream: expected after a crash (at-least-once). Dedupe on batch_id; the DuckDB and Athena views do this.
  • Timestamps look shifted: timestamp is UTC (RFC 3339). Convert in your tool, not in rdstail.

Still stuck?

Open an issue with rdstail version, the engine and version, your config with secrets removed, and the relevant debug log lines. Security issues: see SECURITY.md.

Clone this wiki locally