See Ash Code logo See Ash Code

The OOM killer explained why my SSH session disappeared

Ashlynn Antrobus
• • 3 min read

When I couldn’t get into the home server over SSH, I initially had several possible explanations: the SSH service, storage delays, or something hanging during login.

The kernel logs gave me a different starting point. The OOM killer had run. The machine was under memory pressure, and remote administration was one of the things affected.

A Debian console displays out-of-memory messages naming terminated processes.

A separate example of OOM messages, not my server’s log: Debian 12 OOME errors on logon by Paowee, GNU GPL version 2 or later; unmodified.

That changed the investigation from “why is SSH broken?” to “what is happening to the host while I try to log in?”

Look at the processes before blaming the connection

The N100 was running services alongside development workloads. During the March 7–10 investigation, I found more code-server and VS Code Node processes than I expected. Their resident memory was part of the pressure on the machine.

After clearing the excess development processes, the process list was reduced to a small number of n8n Node processes, and I recovered access.

The kernel entries mattered because a later snapshot can look healthy after the processes have already been killed. Free memory after recovery doesn’t show how much memory was available when the login failed.

I need to distinguish an observation of current usage from an event in the kernel journal. They answer different questions about the incident.

What the swap observations showed

The swap investigation had its own sequence:

Observation or actionWhat happened
Inspect existing swapAn active 4 GiB /swap.img was present.
Consider a larger allocationA 32 GiB replacement or second swapfile was discussed.
Try allocating at the active pathfallocate reported Text file busy.

The proposal isn’t an installed swapfile, and that failed allocation isn’t evidence that a larger one became active. I shouldn’t turn the suggested number into a description of the repaired host.

More swap would also be a separate decision from controlling a growing population of development processes. It can change how memory pressure is handled; it doesn’t explain why those processes kept accumulating.

Administration shares the machine too

I was using the same small host for applications, developer tooling, and the SSH path needed to repair them. A resource problem in one workload could make it difficult to inspect all the others.

That makes process ownership useful information. Several Node processes aren’t necessarily duplicates, and I don’t want to terminate a working service simply because it uses the same runtime as an editor. I need to identify which workload created the processes before cleaning them up.

The successful recovery here came from identifying the memory pressure and clearing the excess processes. Longer-term limits and restart policies need their own implementation and checks; the incident doesn’t establish that every such protection is already in place.

The OOM record gave me a process to investigate after SSH dropped.

AA

Written by Ashlynn Antrobus

Software developer, author, and builder. Sharing technical lessons learned from building tools like Ebook2Text, IndexedDict, and rag-mcp, and navigating life as a programmer with dyslexia.