Monday, March 30, 2015

Fixed "nf_conntrack: table full, dropping packet" Error in Centos


Getting frequent errors with my Linux machine related with nf_conntrack: table full.
Logs showed in tail -f /var/log/messages

Mar 30 10:48:06 bhagwatpc kernel: nf_conntrack: table full, dropping packet.
Mar 30 10:48:09 bhagwatpc kernel: nf_conntrack: table full, dropping packet.
Mar 30 10:48:10 imclproxy kernel: nf_conntrack: table full, dropping packet.






To fix the error please follow the below steps in Centos 6

To print current limit type:
# sysctl net.nf_conntrack_max
Output:65536

To increase this limit to e.g. 100000, type:
# sysctl -w net.nf_conntrack_max=100000

To make this settings permanent add the following line to /etc/sysctl.conf file:
net.nf_conntrack_max = 100000

The following will tell you how many sessions are open right now:
# wc -l /proc/net/nf_conntrack


Thats it. Thanks