The VPS restarts or kills processes due to lack of memory
Confirm the OOM killer, identify the process and fix the memory usage or sizing.
Linux can kill a process to protect the VM when there is no memory left. Kernel logs make it possible to distinguish between OOM, application crash and manual restart.
Step-by-step procedure
-
Read the kernel logs
Search for Out of memory and Killed process with journalctl or dmesg.
-
Measure processes
Use free -h, ps and the panel statistics to spot stable usage or a gradual leak.
-
Limit services
Reduce workers, cache, concurrency and the Docker memory limits. Avoid running several heavy databases on a small plan.
-
Add a margin
If the normal load remains too close to the limit, increase the RAM or distribute the services.