Skip to main content
Servers Are Up
Virtual Datacenter
PricingFree Tools
Sign inBrowse catalog
Servers Are Up
Virtual Datacenter
PricingFree Tools
Sign inBrowse catalog

Loading…

Servers Are Up

Your apps, automation and data on hardware we own. Build a private stack with predictable capacity and access through your dashboard, API or SSH.

SLA with service creditsOwned hardwareUS-based

Make room for your next idea

Explore the capacity, apps and access options that fit your workload. Check current availability and your total before you buy.

Sign up freeView Pricing

Products

  • Linux VPS
  • Windows VPS
  • Cloud & SaaS Services
  • Cloud Storage (Azure)
  • Virtual Datacenter
  • AI & Agent Hosting
  • Containers
  • Instant Apps
  • Software Platforms
  • Network builder
  • Game Servers
  • Free Game Servers
  • Pricing

Resources

  • Free Network Tools
  • 2026 Pricing Benchmark
  • Live SVG Badges
  • Latency & Speed Test
  • Guides & Tutorials
  • Documentation
  • API Reference
  • MCP Server
  • CLI & SDKs
  • OpenAPI & llms.txt
  • Use Cases
  • Free Migration
  • Uptime & Reliability
  • Datacenter
  • System Status
  • Network
  • Provider Comparisons Hub
  • Compare Providers

Company

  • About Us
  • Enterprise
  • Security Architecture
  • Trust Center
  • Blog
  • FAQ
  • Compliance
  • Startup Program
  • Open-Source Sponsorship
  • Press & Media Kit
  • Referral Program
  • Help Center
  • Contact Us
© Servers Are Up
TermsPrivacySLARefund PolicyDPAAcceptable Use
Service information
Docs
  • Documentation Hub
  • Technical Knowledge Library
    Runbooks & 187 Blueprints
  • Choose a Product
    VMs, Containers & Cloud
  • First Linux Server
    SSH, Firewall & Apps
  • Windows Server 2025
    BYOL & Remote Desktop
  • Remote Access
  • Troubleshooting
  • FAQ
  • All Product Guides
    29 Step-by-Step Guides
  • Cloud & SaaS Catalog
    112 Cloud & SaaS Offerings
  • Azure Cloud Storage
    Hot/Cool/Archive & WORM
  • Resource Manager & RBAC
    Groups, Tags & Locks
  • Multi-Model Cloud DB
    JSONB, SQL & pgvector
  • Cloud Identity & ZTNA
    OIDC, SCIM & PIM
  • Key Vault & KMS
    Secrets & Envelope Keys
  • Cloud SIEM, SOAR & DLP
    Posture & Threat Response
  • API Gateway & Cloud DNS
    Edge WAF & DNS Zones
  • Serverless, Workflows & IoT
    Functions, Queues & DAGs
  • SaaS, Governance & Vault
    Budgets & Off-Host GRS
  • Linux Systems & Kernel
    SSH, UFW, sysctl & OOM
  • Self-Hosted Apps & Stacks
    Caddy, Nextcloud & Auth
  • Build Web Apps with AI
  • Next.js and React
  • TypeScript and Node.js
  • npm and Tooling
  • Data and APIs
  • Deploy and Operate
  • Tutorials
  • Infrastructure
  • Automation & Regions
  • API Overview
  • API v1 Reference
    Endpoints & 23 Scopes
  • MCP Server
    129 AI Agent Tools
  • Swagger / OpenAPI 3.1
  • API Playground
  • Versioning & Sunset
  • API Token Security
    Authentication & Tokens
  • Instances API
    Compute Resources
  • Networking API
    Networks & Ports
  • Storage API Availability
    Volumes & Backups
  • Webhooks & Events
    Event Notifications
  • Rate Limits & Best Practices
    Throttling & Retries
  • sau CLI Reference
    34 Commands (v0.2)
  • Browser Web CLI
  • SDKs
  • Infrastructure as Code
    Terraform & Ansible
  • Code Examples
  • CLI & SDK Guides
  • Security Guides
  • Security at a Glance
  • Zero Trust Architecture
  • Live Trust Center
  • Compliance
Need help?

Loading documentation...

Documentation/linux systems

Diagnose Linux OOM kills, sysctl limits, and disk spikes

Investigate OOM exit code 137 crashes, high iowait stalls, and full filesystems while tuning Linux sysctl memory maps, overcommit, and SYN flood guards.

Intermediate
30 min
Updated 2026-11-23

Deploy Ready-to-Run Infrastructure in Seconds

Linux VMs from $6/mo · Pooled Virtual Datacenters from $12/mo · Use code WELCOME20 for 20% off your first order.

Browse ServersView Pricing

Commands checked on 2026-11-23 with Linux Kernel 6.8+, Docker 27+, Ubuntu 24.04 LTS, Debian 12.

What you will have at the end

A systematic first-five-minutes diagnostic workflow to pinpoint OOM-killed containers (exit code 137), iowait bottlenecks, exhausted filesystems or inodes, and a tuned /etc/sysctl.d/99-production.conf baseline for databases and vector engines.

Before you start

  • Shell or Browser Console access on a Linux VM with sudo; see Administer Ubuntu, Debian, Rocky, and AlmaLinux servers cleanly.
  • Familiarity with checking container logs (docker logs) and systemd units (journalctl).

Steps

1. Confirm whether the kernel OOM-killer terminated a process

Exit code 137 (128 + 9 SIGKILL) almost always means the Linux kernel or cgroup memory limit killed the process:

dmesg -T | grep -iE 'killed process|out of memory|oom-kill' | tail -n 20
docker ps -a --format "table {{.Names}}\t{{.Status}}"
docker inspect --format '{{.Name}} OOMKilled={{.State.OOMKilled}} ExitCode={{.State.ExitCode}}' $(docker ps -aq) 2>/dev/null || true
free -m
swapon --show

2. Inspect CPU load, iowait, and open file descriptors

High load average with low %usr CPU and high %wa points to storage contention, swapping, or unindexed DB writes:

vmstat 1 5
iostat -xz 1 3 2>/dev/null || sar -d 1 3 2>/dev/null || top -b -n 1 | head -n 20
sudo ss -s
cat /proc/sys/fs/file-nr

3. Find hidden disk and inode exhaustion cleanly

Sometimes df -h shows 100% used even after deleting large log files because a running daemon holds the deleted file handle open ((deleted)):

df -hT
df -i
sudo lsof +L1 2>/dev/null | head -n 25
sudo du -xhd 1 /var/lib /var/log 2>/dev/null | sort -h
docker system df 2>/dev/null || true

Reloading or restarting the process holding a deleted log releases the reclaimed disk blocks immediately; clean unused images cautiously with docker image prune -a --filter "until=168h".

4. Apply production kernel sysctl parameters for databases & vector engines

Vector databases (Qdrant), search engines (Meilisearch, OpenSearch), and in-memory stores (Valkey/Redis) require higher vm.max_map_count and predictable overcommit behavior alongside network hardening:

sudo tee /etc/sysctl.d/99-production.conf >/dev/null <<'EOF'
# Memory and mmap tuning (PostgreSQL, Valkey, Qdrant, Meilisearch)
vm.overcommit_memory = 1
vm.max_map_count = 1048576
vm.swappiness = 10

# Kernel & Network Hardening
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.tcp_syncookies = 1
net.core.somaxconn = 4096
kernel.kptr_restrict = 2
kernel.randomize_va_space = 2
EOF
sudo sysctl --system

5. Disable Transparent Huge Pages (THP) for Redis, Valkey & PostgreSQL

THP increases latency tails and fork memory usage during RDB background saves. Create a lightweight systemd oneshot unit so THP remains never across reboots:

cat /sys/kernel/mm/transparent_hugepage/enabled
sudo tee /etc/systemd/system/disable-thp.service >/dev/null <<'EOF'
[Unit]
Description=Disable Transparent Huge Pages for Databases
Before=docker.service postgresql.service valkey-server.service redis-server.service

[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo never > /sys/kernel/mm/transparent_hugepage/enabled && echo never > /sys/kernel/mm/transparent_hugepage/defrag'
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable --now disable-thp.service

Check that it works

Verify applied kernel sysctls and THP state:

sysctl vm.overcommit_memory vm.max_map_count vm.swappiness net.ipv4.tcp_syncookies
cat /sys/kernel/mm/transparent_hugepage/enabled

You should see 1, 1048576, 10, 1, and always madvise [never].

What can go wrong

  • Container still OOM-kills despite generous host RAM. A Compose deploy.resources.limits.memory or JVM -Xmx / Node --max-old-space-size mismatch is hitting a cgroup cap. Size Node heap to 70–75% of the container limit (NODE_OPTIONS=--max-old-space-size=1536 inside a 2G container).
  • sysctl --system warns cannot stat /proc/sys/net/ipv6/.... IPv6 is disabled at boot; comment the IPv6 line or prefix with -net.ipv6... in sysctl drop-ins so boot never flags an error.
  • PostgreSQL container restarts continuously after disk hits 100%. Do NOT run docker volume rm or delete pg_wal/. Expand storage or free /var/lib/docker/overlay2 / old logs first, then start Postgres so crash recovery replays WAL cleanly.

Good practice

  • Set explicit mem_limit / deploy.resources.limits.memory on every Node.js, Python, and Java container so one memory leak cannot starve sshd or PostgreSQL.
  • Pair OOM diagnostics with persistent metrics monitoring in Deploy Grafana, VictoriaMetrics, and Uptime Kuma.
  • Keep automated off-host backups tested regularly via Backups and snapshots.

Where to go next

  • Tune Valkey, Qdrant, Meilisearch, and MinIO in Docker
  • Fix Docker UFW bypasses with DOCKER-USER and nftables
  • Dedicated game server Linux UDP and JVM flags tuning

Related Articles

Fix Docker UFW bypasses with DOCKER-USER and nftables

Read more

Harden OpenSSH and sandbox systemd services cleanly

Read more

Administer Ubuntu, Debian, Rocky, and AlmaLinux servers cleanly

Read more

Frequently Asked Questions

What does the Diagnose Linux OOM kills, sysctl limits, and disk spikes documentation guide cover?
Investigate OOM exit code 137 crashes, high iowait stalls, and full filesystems while tuning Linux sysctl memory maps, overcommit, and SYN flood guards. It is rated intermediate difficulty (30 min) and applies to Servers Are Up infrastructure and workflows.
Can I manage or automate these steps through the Servers Are Up dashboard, REST API v1, or MCP server?
Yes. Every Servers Are Up server includes browser-based SSH, WebRDP, and VNC console access in the dashboard, plus programmatic control via the REST API v1 (/api/v1) and hosted Model Context Protocol server (/api/mcp/v1) using a scoped Personal Access Token.

Need hands-on help with Diagnose Linux OOM kills, sysctl limits, and disk spikes?

Every Servers Are Up virtual machine and container includes an integrated HTML5 browser-based SSH, RDP, and VNC console in your dashboard, default-off inbound firewall rules with per-IP allow-lists, and full programmatic control via REST API v1 and Model Context Protocol (MCP). Explore our Virtual Datacenter Plans or reach out to Servers Are Up Support.

Was this article helpful?

On this page

What you will have at the endBefore you startSteps1. Confirm whether the kernel OOM-killer terminated a process2. Inspect CPU load, iowait, and open file descriptors3. Find hidden disk and inode exhaustion cleanly4. Apply production kernel sysctl parameters for databases & vector engines5. Disable Transparent Huge Pages (THP) for Redis, Valkey & PostgreSQLCheck that it worksWhat can go wrongGood practiceWhere to go next
Need Live Commands?

Open Aria in Wide Engineering Mode for distro-specific commands, compose tweaks, and isolated environment troubleshooting.

Knowledge Library