systemd-start-limit

systemd 启动频率限制导致服务起不来的定位

现象

systemctl start app 失败,systemctl status app 显示 start request repeated too quickly 或 start-limit-hit。服务可能短暂启动后反复崩溃,最终被 systemd 锁定。

快速定位

systemctl status app
journalctl -u app --since '10 min ago'
systemctl show app -p StartLimitIntervalSec -p StartLimitBurst -p Restart
systemctl show app -p ExecStart -p User -p WorkingDirectory
systemctl reset-failed app

常见根因

  1. 服务启动即崩溃,短时间内触发重启上限。
  2. ExecStart 路径、参数或运行用户错误。
  3. 端口被占用、配置缺失、依赖服务未就绪。
  4. Restart=always 放大崩溃循环。
  5. StartLimitIntervalSec/StartLimitBurst 设置过严。

修复

相关命令