Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

My watchdog killed the gateway twelve seconds after start

说明与用途

一个每小时运行的守护进程在冷启动期间因验证窗口过短而向消息网关发送 SIGUSR1,导致网关崩溃。通过添加收据文件、将助手标记为已完成并删除旧的 launchd 任务,解决了此问题。

问题

A scheduled helper that restarts a messaging gateway was killing the gateway during its cold start because its verification window was shorter than the gateway’s startup time.

结果

The gateway ran successfully after the helper was idempotent and the redundant launchd job was removed, eliminating the SIGUSR1 kills.

工作流

  • 1. Helper ran hourly via launchd with keepalive.
  • 2. Helper invoked gateway restart and waited 180 s.
  • 3. Helper verified gateway; on failure exited 1.
  • 4. launchd relaunched helper, repeating the cycle.
  • 5. SIGUSR1 from helper killed gateway during cold start.
  • 6. Helper was changed to check a receipt file before restarting.
  • 7. Helper marked itself retired and exited 0.
  • 8. Obsolete launchd job was removed.

证据

An hourly helper around notification cadence kept restarting the shared messaging gateway behind my two chat bridges while everything inside the gateway was healthy.

来源

Mine did exactly that on my Mac. An hourly helper around notification cadence kept restarting the shared messaging gateway behind my two chat bridges while everything inside the gateway was healthy.

来源

First, the helper checks a receipt file before doing anything else. A prior done or retired receipt carrying notify_seconds=3600 returns success immediately, no config write, no restart subprocess, nothing for launchd to escape against.

来源

  • 记录日期: 2026-11-01T20:58:51.827Z