OpenWrt Forum Archive

Topic: How can I increase the max number of connections on the latest trunk?

The content of this topic has been archived on 1 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm on the latest trunk, and just notice that the 'Active Connections' on the main status page sits at 1836/1836. When I go to web pages, it usually takes a couple of seconds for it to start loading, and then it loads instantly. I'm guessing it has to wait for one of the active connections to timeout. Is there a way to increase the maximum number of connections? I couldn't find anything in LUCI.

in theory it's in the file /proc/sys/net/ipv4/ip_conntrack_max

in theory you could modify /etc/sysctl.conf and add:
net.ipv4.ip_conntrack_max=16384

Ok. I added that in there, but when I reload using "sysctl -p", I get this(I added some other parameters in there as well that I found in older posts). And the active connections is still at 1836 on the status page.

net.ipv4.tcp_timestamps = 0
net.netfilter.nf_conntrack_checksum = 0
sysctl: error: 'net.ipv4.netfilter.ip_conntrack_checksum' is an unknown key
sysctl: error: 'net.ipv4.netfilter.ip_conntrack_max' is an unknown key
sysctl: error: 'net.ipv4.ip_conntrack_max' is an unknown key
sysctl: error: 'net.ipv4.netfilter.ip_conntrack_tcp_timeout_established' is an unknown key
sysctl: error: 'net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait' is an unknown key
sysctl: error: 'net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait' is an unknown key
sysctl: error: 'net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait' is an unknown key
sysctl: error: 'net.ipv4.netfilter.ip_conntrack_udp_timeout' is an unknown key
sysctl: error: 'net.ipv4.netfilter.ip_conntrack_udp_timeout_stream' is an unknown key

LuCI uses "sysctl net.nf_conntrack_max" to find the max value, what does it report in your case?

Awesome. Thanks jow. That was it. I changed the net.nf_conntrack_max setting to 16384 in sysctl.conf and that is now what it shows in LUCI. Do you know if this is documented anywhere? I'm thinking if it is, that wiki would likely have some other useful info in it.

The discussion might have continued from here.