MSK · UTC+3 · 18 Nov 2026note

← all notes

When conntrack runs out

networking6 Oct 2026 · 3 min read

Every connection through a Linux router with a stateful firewall occupies a conntrack entry. The table is finite, and when it fills, new connections are dropped — often while the host itself looks perfectly healthy.

The symptom

dmesg | grep -i conntrack
# nf_conntrack: table full, dropping packet

The first connections after the table fills are dropped, then some old entries expire and space appears. From the outside it looks like random timeouts on new connections while existing sessions keep working.

load rises table full — new flows dropped
Existing sessions keep working, which is why the outage looks partial and confusing.

What to check before raising the limit

The usual real cause

A load balancer or monitoring system that opens a new connection per check, with no keepalive. Fixing the client to reuse connections often halves the table without touching a single sysctl.

Only after that: raise nf_conntrack_max, raise the hash table size (nf_conntrack_buckets), and lower timeouts for states you do not need to keep for days.