ACLClouds
ACLClouds

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

  1. Read the kernel logs

    Search for Out of memory and Killed process with journalctl or dmesg.

  2. Measure processes

    Use free -h, ps and the panel statistics to spot stable usage or a gradual leak.

  3. Limit services

    Reduce workers, cache, concurrency and the Docker memory limits. Avoid running several heavy databases on a small plan.

  4. Add a margin

    If the normal load remains too close to the limit, increase the RAM or distribute the services.