How to Fix journalctl Logs Consuming 100% Disk Space on Ubuntu Servers

Root Cause Diagnosis Systemd-journald continuously collects log data from kernel events, system services, and stdout/stderr streams, storing them in persistent binary files under /var/log/journal/. By default, systemd caps journal storage at up to 10% of the root file system’s total volume capacity, which can equate to dozens of gigabytes on large disks. When an unhandled … Read more

Linux Out of Memory Killer (oom-killer) Picking Wrong High-Priority Daemon: Tuning oom_score_adj

Root Cause Diagnosis The Linux kernel’s Out of Memory (OOM) killer selects target processes to terminate based on a calculated oom_score, which correlates directly with the percentage of system RAM consumed by a process and its child tasks. High-priority system daemons (such as database engines or API gateways) that consume significant memory during normal operation … Read more

Fixing SSH Error: Host Key Verification Failed After VPS Re-installation

Root Cause Diagnosis This error occurs because SSH records the unique cryptographic host key fingerprint of remote servers in your local ~/.ssh/known_hosts file upon first connection. Re-installing the OS on your VPS generates a new pair of host keys while keeping the same IP address or domain name. SSH detects this fingerprint mismatch and halts … Read more

Resolving Linux Swap Partition Not Mounting Automatically on System Reboot

Root Cause Diagnosis This issue occurs when the /etc/fstab configuration file contains an invalid, outdated, or missing UUID reference for the swap partition, often caused by repartitioning or OS reinstalls that regenerate disk identifiers. It can also stem from systemd mount timeouts, uninitialized swap headers on the partition, or fast-boot settings skipping secondary storage initialization … Read more

Docker Compose Network: “Port is Already Allocated” Fix

Root Cause Diagnosis This error occurs when Docker attempts to bind a host port defined in your docker-compose.yml file to a container port, but that host port is already in use by another running service, a orphaned Docker container, or an active network socket. In bridge network configurations—whether default, custom, or marked as external: true—port … Read more

Fixing apt-get update Hash Sum Mismatch error on Ubuntu archive mirrors

Root Cause Diagnosis The Hash Sum Mismatch error occurs when the checksums listed in the repository index file (InRelease or Release) do not match the calculated checksums of the downloaded package indices (such as Packages.xz or Translation-en). This typically happens due to caching proxies or Content Delivery Networks (CDNs) serving out-of-sync mirror metadata, corrupted local … Read more

How to clear dead Docker overlay2 storage directory safely without breaking daemon

Root Cause Diagnosis Accumulation of dead directories in /var/lib/docker/overlay2 occurs when the Docker daemon crashes, loses daemon state tracking, or experiences ungraceful container terminations before completing layer cleanup. Manually executing rm -rf /var/lib/docker/overlay2/* breaks the Docker daemon by destroying the active image layer database and local SQLite/bolt key-value stores located in /var/lib/docker/image/overlay2/imagedb/. This creates orphaned … Read more

Linux systemd service status: main process exited, code=killed, status=9/KILL

Root Cause Diagnosis The status code=killed, status=9/KILL in systemd indicates that the main process was abruptly terminated by an uncatchable SIGKILL signal issued either by the Linux kernel Out-Of-Memory (OOM) killer or an explicit system invocation (such as systemd-oomd, an administrator, or explicit resource timeout enforced by systemd itself). Unlike SIGTERM (signal 15), SIGKILL cannot … Read more

Resolving Linux error: No space left on device when disk space shows 50% free (Inodes full)

Root Cause Diagnosis The Linux filesystem allocates a fixed number of Index Nodes (inodes)—metadata structures that store file ownership, permissions, and location data—when a partition is created using filesystems like Ext4. When a system creates millions of tiny files (e.g., PHP sessions, build caches, log files, or uncollected Docker layers), it exhausts the allocated pool … Read more

Fix: Docker exited with code 137 on low-memory ARM instances

Root Cause Diagnosis Docker exit code 137 indicates that a process inside the container was forcefully terminated by the Linux kernel’s Out-Of-Memory (OOM) Killer (SIGKILL signal 9 + offset 128). On low-memory ARM architectures (such as AWS Graviton t4g.nano/micro or Raspberry Pi 4 with 1GB–2GB RAM), page size differences (e.g., 64KB pages vs standard 4KB … Read more