conntrack table full -- nf_conntrack: table full, dropping packet
dmesg shows 'nf_conntrack: table full, dropping packet'
Focused incident mode — strips away everything but this runbook.
Symptoms
- dmesg shows 'nf_conntrack: table full, dropping packet'
- Intermittent packet drops and connection failures on a busy server
- Connections established before the drop window work, new connections fail
Every NAT'd connection consumes a conntrack entry. On high-traffic NAT gateways or load balancers, the default 262144 entries can fill in seconds. Always size conntrack_max based on expected concurrent connections.
Evidence to grab
Collect these artifacts before you change anything — they prove (or rule out) each cause.
Current conntrack utilization
sysctl net.netfilter.nf_conntrack_count && sysctl net.netfilter.nf_conntrack_maxKernel drop counter
dmesg | grep -i 'conntrack|table full' | tail -10
Diagnostic flow
Run the steps in order, marking each claim confirmed or refuted. The evidence you gather feeds the ranked causes below.
Guided decision tree is ready.
Steps with commands, expected output, and pass/fail branches.
Ranked root causes
Evidence checklist
- nf_conntrack_count consistently near nf_conntrack_max
- Drops correlate with traffic spikes
Confirm before fixing
sysctl net.netfilter.nf_conntrack_count net.netfilter.nf_conntrack_maxConfirm the table is at capacity
Fix
sysctl -w net.netfilter.nf_conntrack_max=1048576Increase the conntrack table size
Resolution runbook
Apply from top to bottom after the cause is confirmed. Review every command before running it — risk tags are shown on each.
sysctl net.netfilter.nf_conntrack_count net.netfilter.nf_conntrack_maxCheck current utilization
dmesg | grep -i 'conntrack|table full' | tail -5Confirm drop messages
sysctl -w net.netfilter.nf_conntrack_max=1048576Increase the table size
sysctl -w net.netfilter.nf_conntrack_tcp_timeout_close_wait=30Reduce stale entry timeouts
Prevention
- Set nf_conntrack_max to at least 4x the expected concurrent connections.
- Monitor nf_conntrack_count / nf_conntrack_max and alert at 80% utilization.
- Reduce TCP timeout values for states that shouldn't persist (CLOSE_WAIT, TIME_WAIT).
- Use nf_conntrack_audit=1 temporarily to identify what's consuming entries during an incident.
Related runbooks
Same stack, same failure family — worth a skim.
curl: Connection timed out after 30-120s instead of refused
Connections to a specific port fail despite an ACCEPT rule existing for the source
curl: (56) Connection reset by peer
Commands marked READ CHANGE DESTRUCTIVE — never run DESTRUCTIVE commands against production data you cannot restore. Copy → verify → execute.