Files
ykxmz/_build/_c10.txt
T
xmz7891 bcb089eded 看门狗:连接数掉到 1 就立刻重启,不等攒够 3 次
排查公网间歇 530 时发现的:
  watchdog 日志显示「公网不通(HTTP 530,ha_connections=1)」
  —— 出问题那段时间隧道**只剩 1 条连接**。

原来 watchdog 只把 CONNS == 0 算"零连接",
CONNS == 1 不当回事。但实测**只剩一条连接时跨机房回源就会失败**
(请求落 SEA,隧道只剩 LAX 一条)。

改法:
  * CONNS <= 1 都计入降级计数
  * 公网不通 **且** 连接数已在危险区 = 确认的故障(不是短抖动)
    -> 立刻重启,不等 3 次

每次检查间隔 20 秒,等 3 次就是白断 40 秒。现在能省下来。

实测:改完公网 15/15 = 100%,连接数 4 条。

顺带说明 watchdog 是怎么跑的:
  systemd timer(lanremote-watchdog.timer),每 20 秒调一次
  watchdog.service。之前查"服务是 inactive"一度以为它没在跑,
  其实是 timer 触发型的 —— oneshot 服务跑完就是 inactive,正常。
2026-10-07 10:00:50 +08:00

24 lines
1023 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
看门狗:连接数掉到 1 就立刻重启,不等攒够 3 次
排查公网间歇 530 时发现的:
watchdog 日志显示「公网不通(HTTP 530,ha_connections=1)」
—— 出问题那段时间隧道**只剩 1 条连接**。
原来 watchdog 只把 CONNS == 0 算"零连接",
CONNS == 1 不当回事。但实测**只剩一条连接时跨机房回源就会失败**
(请求落 SEA,隧道只剩 LAX 一条)。
改法:
* CONNS <= 1 都计入降级计数
* 公网不通 **且** 连接数已在危险区 = 确认的故障(不是短抖动)
-> 立刻重启,不等 3 次
每次检查间隔 20 秒,等 3 次就是白断 40 秒。现在能省下来。
实测:改完公网 15/15 = 100%,连接数 4 条。
顺带说明 watchdog 是怎么跑的:
systemd timer(lanremote-watchdog.timer),每 20 秒调一次
watchdog.service。之前查"服务是 inactive"一度以为它没在跑,
其实是 timer 触发型的 —— oneshot 服务跑完就是 inactive,正常。