Skip to content
DDoS protection · Peeryx · 15 Tbps+
All guides

Slow Linux VPS, RAM and SSH timeouts: diagnose the cause

High used RAM, slow SSH and an application restart may coincide without sharing one cause. Before upgrading or rebooting, collect observations during the incident. A large cache alone is not memory exhaustion; a timeout alone is not evidence of an OOM kill.

← Back to all guidesCubixServ

Before you start

Use your Linux VPS and its recovery console when SSH is unavailable. These read-only commands do not change the system; some need administrative access or installed tools. Redact sensitive information before sharing output.

Record context before restarting

Note the time zone, affected application and most recent change. Rebooting can remove evidence without resolving the cause. Compare the incident interval with application logs and client-area measurements.

Timestamp and observed load

date -Is
uptime

Load average is not a CPU percentage: waiting tasks, including tasks waiting for I/O, can raise it. Keep the workload context and do not draw a conclusion from this number alone.

Read available memory rather than cache alone

Linux uses otherwise free memory for reclaimable caches. The available column estimates memory usable by new applications; free and available are not interchangeable. Compare observations taken during the slowdown rather than only immediately after boot.

Memory and swap overview

free -h

Inspect available alongside RAM and swap totals. Used swap does not prove intensive swapping now. A containerized application can reach its own memory limit while the VPS still has available memory.

Compare swapping, disk waits and pressure

Persistent swapping and waits can accompany latency; merely occupied swap is not a diagnosis. PSI describes time stalled on resource contention, not how much RAM is occupied.

Short system-activity sample

vmstat 1 5

The first report summarizes since boot; subsequent reports cover the intervals. Compare si/so, wa and waiting tasks during the incident. An isolated value measures neither network throughput nor an attack.

Memory pressure when the kernel exposes PSI

cat /proc/pressure/memory

some and full describe stalled time, while avg10, avg60 and avg300 cover different windows. A missing file can mean PSI is unavailable; it does not mean pressure is zero.

Look for actual OOM evidence in logs

An application can exit because of a software failure, container limit or maintenance action. Match the service, time and exact event. Without corresponding evidence, report OOM as unconfirmed rather than claim the kernel killed the game server.

Read kernel events from the last hour

journalctl -k --since '-1 hour' --no-pager | grep -Ei 'out of memory|oom-kill|killed process'

Additional permissions may be needed. No match does not rule out OOM: the time window, retention or logs may be incomplete. Match the reported process and PID with the affected workload.

Separate SSH listening, CPU and network failures

When the console responds but SSH times out, check local listening state before blaming RAM. A listener does not validate external routing or authentication. If SSH connects but remains slow, compare workload and system activity during the same interval.

TCP listening on the configured SSH port

ss -lnt 'sport = :22'

The default port is 22; adapt it only if the service was configured differently. This inspects sockets without opening a port or changing firewall or SSH settings.

Choose a justified correction and measure it

Provide support with timestamps, relevant logs, workload context and authorized external checks. Repeated memory pressure can justify application limits, tuning or more RAM; a routing failure requires a different investigation.

Do not use cache dropping as a universal remedy, delete data or restart repeatedly. Back up before a targeted change, change one element at a time and compare the same workload afterward. A larger plan does not repair software or configuration faults.

For your situation

SituationNext check
Large cache, available memory and no contentionDo not diagnose exhaustion from cache alone; observe the actual workload.
Swapping and pressure coincide with slowdownsIdentify affected processes and limits before changing settings or capacity.
SSH times out but the console respondsCompare the listener, address, port and external path rather than automatically blame RAM.

Official sources

These documents describe the relevant protocols and software. Your service terms and configuration still need to be checked.

  1. Linux / KVM/admin-guide/mm/concepts.html
  2. Linux / KVM/accounting/psi.html
  3. man7.org/linux/man-pages/man1/free.1.html
  4. man7.org/linux/man-pages/man8/vmstat.8.html
  5. www.freedesktop.org/software/systemd/man/latest/journalctl.html
  6. man7.org/linux/man-pages/man8/ss.8.html