How to increase concurrent TCP connections on Linux server?

kumkumsharma

Administrator
Staff member
When you will get error in /var/log/messages that packets are being dropped due to limit being reached then you have to increase the limit of concurrent connections on server.

We have set Concurrent connections limit on server due to security otherwise hackers can hack the server. If any particular file is causing the issue then we can check the current limit with below commands:

Code:
/proc/sys/net/netfilter/nf_conntrack_max
/proc/sys/net/ipv4/netfilter/ip_conntrack_max
But if above command does not work then you can search the file with below command:

Code:
find /proc -name '*conntrack_max*'
You can increase the connections by echoing the number of conntrack_max file.

Code:
cat 250000 >/proc/sys/net/netfilter/nf_conntrack_max
now you have to edit/etc/sysctl.conf file to make your changes permanent and add or edit below line in /proc file location:

Code:
net.netfilter.nf_conntrack_max = 250000
 
Top