Reference

set maxconn global

Change the load balancer’s process-side maximum concurrent connections (maxconn) setting.

Description Jump to heading

You can define a maxconn setting in the global section of your configuration, which limits the number of concurrent connections the load balancer process will accept. When this limit is reached, connections queue up in the kernel’s socket queue.

haproxy
global
maxconn 75000
haproxy
global
maxconn 75000

Use the set maxconn global command to change this limit dynamically. If the limit goes lower than the current number of connections, new connections will queue until they reach the lower threshold. You must set the maxconn in your configuration file first, since you are not allowed to increase it past that initial value.

Set it to zero to restore the initial setting.

Examples Jump to heading

Below, we set the global maxconn setting to 60,000:

bash
echo "set maxconn global 60000" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
bash
echo "set maxconn global 60000" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999

See also Jump to heading

If this page was useful, please, Leave the feedback.