li
|
e687ca3e9d
|
fix(ops): 系统日志落库失败后退避重试,避免拖垮数据库连接池
OpsSystemLogSink 的 flush 没有任何失败退避:ticker 每 1 秒触发一次,每次都
带 5 秒超时打一批 COPY,失败后立刻在下一个 tick 再来一次。远程 PostgreSQL 上
COPY 被 context 取消会导致协议失步、连接被服务端 FATAL 终止,于是这条循环
变成持续的「占用连接 → 超时取消 → 销毁重建」;在 max_open 较小的连接池里,
日志通道会长期占满连接,业务侧最终报 Billing 503。
改为连续失败后指数退避(2s 起,翻倍,封顶 60s):
- 退避窗口内直接丢弃当前批次并计入 dropped_count,不再触达数据库;
- 任意一次成功立即清空失败计数与抑制窗口;
- 失败日志随退避天然收敛为每个窗口至多一条,并附带 failures/backoff。
Fixes #5265
|
2026-08-07 18:45:05 +08:00 |
|
benjamin
|
b92bbf0299
|
fix: 过滤入口拒绝日志并强化鉴权边界
|
2026-07-18 00:11:18 +08:00 |
|
 bestonyandmultica-agent
|
0f2ec134b5
|
fix(ops): bound indexed log host length
Co-authored-by: multica-agent <github@multica.ai>
|
2026-07-14 01:29:47 +08:00 |
|
 bestonyandmultica-agent
|
2c2e50ba58
|
feat(ops): add host filtering to system logs
Co-authored-by: multica-agent <github@multica.ai>
|
2026-07-14 01:29:46 +08:00 |
|
Bestony
|
bad87ff533
|
feat(ops): add api key filter to system logs
|
2026-06-27 14:35:19 +08:00 |
|
yangjianbo
|
84cc651b46
|
fix(logger): 修复 caller 字段与 OpsSystemLogSink 停止刷盘
修复点:
- zap logger 不再强制 AddCallerSkip(1),确保 caller 指向真实调用点
- slog handler 避免重复写 time 字段
- OpsSystemLogSink 优先从字段 component 识别业务组件;停止时 drain 队列并用可用 ctx 刷盘
补充:新增/完善对应单测
|
2026-02-12 17:42:29 +08:00 |
|
yangjianbo
|
fff1d54858
|
feat(log): 落地统一日志底座与系统日志运维能力
|
2026-02-12 16:27:29 +08:00 |
|