解决 Prometheus 报错 remote write: backoff exhausted 重试耗尽丢点
分析 Prometheus 远端写入达到最大重试时间后丢弃时序数据根因,提供 min/max_backoff 与超时参数调优方案。
问题现象
Prometheus 日志打印:
msg="Dropped sample, backoff exhausted" subendpoint=http://tsdb:8428/api/v1/write
指标 prometheus_remote_storage_dropped_samples_total 上升。
触发根因
网络闪断或下游存储宕机时间超过了单批重试的最大生存窗口。
解决步骤与操作命令
步骤一:放宽最大退避间隔并调大队列容量
queue_config:
capacity: 100000
max_backoff: 30s
batch_send_deadline: 10s
确保在下游短时维护期间,数据在内存队列中安全缓存。


