Find Why a Linux systemd Service Keeps Restarting
Use service events, MemoryMax and journal lines in WatchLog to tell an application exit from an OOM kill or a failure after a release.
A service that comes back after every restart can still make its callers fail every few minutes. Before changing the restart policy or raising a limit, find out what ended the last run: an application exit, a memory kill, or a failure that began after a change.
Start with the first failed run you can see
In WatchLog, choose the server fleet and host, then find the systemd unit under Running here or open it from the alert. Set a time range that includes the first known failure. In the events, compare Failed, Restarted and OOMKilled. A Restarted event says the unit came back. Look for an earlier failure or exit to explain why it stopped. WatchLog exposes systemd’s failure result and exit code, plus kernel exit or memory-kill evidence where available.
Check what changed before the service began to fail
In the public demo, WatchLog shows orders.service exiting with code 1 after its executable changed. Follow Open change to investigate the unit. Check for nearby Release and UnitChanged events to distinguish a changed executable from a changed unit file. That timing tells you where to look, not what broke in the new release.

Check whether the unit hit its own memory ceiling
Compare the unit’s memory chart with MemoryMax and check for an OOM event at the same time. A host may still have free memory while one service hits its own limit. An OOM event at the unit’s ceiling points to the unit limit, but does not tell you why the service needed that much memory. Compare memory use under similar load before choosing between a limit that is too low and a process that is using more memory than expected.
Use journal lines to make the next check specific
Open the unit’s Logs panel and compare the latest journal lines with the exit time. A missing configuration message just before exit gives you something concrete to verify. An OOM kill may leave no final application log line. If you see a restart without a failed exit or a kill, check for a deliberate restart before calling it a crash. Linux journals do not have Kubernetes’ Previous run switch.
In the WatchLog demo, open Alerts and look for the orders.service crash-loop example under demo-docker. See Linux monitoring setup and service events. For Kubernetes, see how to read a previous container run.