PDA

View Full Version : How to reduce number of connections OpenVZ VPS is allowed to make?



Fli
02-16-2017, 10:03 PM
Hello,

while having nodewatch installed on the OpenVZ host node, it reports that one VPS has 11734 UNREPLIED TCP conntrack sessions


ipv4 2 tcp 6 69 SYN_SENT src=guest_server_ip dst=some_remote_ip sport=41036 dport=5901 [UNREPLIED] src=guest_server_ip dst=some_remote_ip sport=5901 dport=41036 mark=0 secmark=0 use=2
ipv4 2 tcp 6 43 SYN_SENT src=guest_server_ip dst=some_remote_ip sport=41910 dport=5900 [UNREPLIED] src=some_remote_ip dst=guest_server_ip sport=5900 dport=41910 mark=0 secmark=0 use=2

If i want to decrease number of connections this VPS can be running at a time, how can i do it?

I found this:
vzctl set VPSID --numothersock 400 --numtcpsock 400 --save

from the vzctl manual:

--numtcpsock items[:items]
Maximum number of TCP sockets. This parameter limits the number of TCP connections and, thus, the number of clients the server application can handle in
parallel. Setting the barrier and the limit to different values does not make practical sense.

--numothersock items[:items]
Maximum number of non-TCP sockets (local sockets, UDP and other types of sockets). Setting the barrier and the limit to different values does not make
practical sense.

But when executed that vzctl command, the number of the connections not decreased.