You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Systemd用户服务频繁停止重启问题排查求助

Systemd用户服务频繁停止重启问题排查求助

各位前辈,我碰到个棘手的问题——我配置了几个systemd用户级服务,但运行一段时间后都会自行停止然后重启,日志里几乎找不到明确的原因。下面是其中一个Go Web服务的配置信息:

[Unit]
Description=App

[Service]
WorkingDirectory=/home/dev/app
ExecStart=sh /home/dev/app/run.sh
Restart=always

[Install]
WantedBy=default.target

我已经通过systemctl --user enable app命令启用了这个服务。查看journalctl的日志,发现了这些记录:

Jan 26 16:53:41 Ubuntu-2004-focal-amd64-base systemd[411708]: Started App.
Jan 26 17:03:44 Ubuntu-2004-focal-amd64-base systemd[411708]: Stopping App...
Jan 26 17:03:44 Ubuntu-2004-focal-amd64-base systemd[411708]: app: Killing process 411808 (renderer) with signal SIGKILL.
Jan 26 17:03:44 Ubuntu-2004-focal-amd64-base systemd[411708]: app.service: Succeeded.
Jan 26 17:03:44 Ubuntu-2004-focal-amd64-base systemd[411708]: Stopped App.
Jan 26 17:03:54 Ubuntu-2004-focal-amd64-base systemd[412783]: Started App.

实在搞不懂哪里出问题了,有没有大佬能指点一下?谢谢!

备注:内容来源于stack exchange,提问作者Pedro

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 15:52:35