Ask Your Question

Is it possible to increase maxconn value on haproxy [closed]

asked 2014-07-11 03:00:14 -0500

nevzat gravatar image

Hi, I am using neutron load balancer service with haproxy provider. I wonder, What is the highest value for maxconn value on neutron load balancer service. Is it possible to increase maxconn value greater than 2000 on neutron load balancer service?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by nevzat
close date 2014-07-16 10:42:20.308062

2 answers

Sort by » oldest newest most voted

answered 2014-07-16 10:39:43 -0500

nevzat gravatar image

updated 2014-07-16 10:56:08 -0500

I solved this issue. I've added maxconn value ​​in the following file.


After the changing this file, modified partitions are as follows,

I've just added maxconn value both of functions. After changing, I restarted neutron services, then I tested my system and I reached 15K connection. Without adding this value I've just reached 2k connection.

def _build_global(config, socket_path=None, user_group='nogroup'):
opts = [
    'user nobody',
    'group %s' % user_group,
    'log /dev/log local0',
    'log /dev/log local1 notice',
    'maxconn 15000'

if socket_path:
    opts.append('stats socket %s mode 0666 level user' % socket_path)

return itertools.chain(['global'], ('\t' + o for o in opts))

def _build_defaults(config):
opts = [
    'log global',
    'retries 3',
    'option redispatch',
    'timeout connect 5000',
    'timeout client 50000',
    'timeout server 50000',
    'maxconn 15000'

return itertools.chain(['defaults'], ('\t' + o for o in opts))

note: I've tested several time; One of these tests is as follows;

I added maxconn value (15K) in the file and I set maxconn value while creating VIP to 20K. After the test, I reached 15K connection. I think that value, which was set during creating VIP, is ineffective.

Thanks for helping @foexle.

edit flag offensive delete link more


good job! :)

foexle gravatar imagefoexle ( 2014-07-17 02:11:18 -0500 )edit

answered 2014-07-11 09:37:30 -0500

foexle gravatar image

You can choose the connection limit if you create your VIP for your lb pool.

Do you have read this one ? LBaaS

Cheers Heiko

edit flag offensive delete link more


Hi, I have already chosen connection limit for my lb pool while creating VIP on dashboard, but it hasn't been affected. When I test the system to learn max connection count, it has never passed over 2000 connections (I use TCP for my lb protocol). Do you have any idea or suggestion?

nevzat gravatar imagenevzat ( 2014-07-13 10:51:33 -0500 )edit

So you're sure the problem will be occure by the haproxy ? Maybe is your problem the service behind ?

foexle gravatar imagefoexle ( 2014-07-14 05:12:44 -0500 )edit

I deleted lb pool. Then,I configured the haproxy.conf file (I gave ip of neutron node for loadbalancing ), and then I tested again. It was passed over 2000 connections (about 28K) without use neutron lb service. I think problem has occurred by limitation of openstack.

nevzat gravatar imagenevzat ( 2014-07-14 05:49:20 -0500 )edit

Do you have tryed to increase the maxcon value ? So i mean unlimit is -1 but do you add 23k ?

I've take a look into the code:

looks like the option will be set in the haproxy:

frontend 4fc577eb-d79a-4707-85d0-6dfc5073be7b
        option tcplog
        mode http
        default_backend 23fa7f63-a92f-48eb-9dc9-578fa296c999
        maxconn 4000
        option forwardfor
foexle gravatar imagefoexle ( 2014-07-15 02:56:17 -0500 )edit

I add 100k for conneciton limit while creating VIP, but it has never passed over 2000 connections. I reached over 28K connection when I used just haporxy not used neutron loadbalancer service (no lb pool in my system). Whenever I use LB and create VIP, the system create a config file (e.g. "/var/lib/neutron/lbaas/30c470c4-4e9d-489c-b9e3-867b3b95acf4/conf" ) and maxconn value is located in this file.

frontend 26d8e9b8-35a1-4a2a-addc-8dfede515d1c
option tcplog
mode tcp
default_backend 30c470c4-4e9d-489c-b9e3-867b3b95acf4
maxconn 100000

Is there another limitation for openstack?

nevzat gravatar imagenevzat ( 2014-07-15 03:14:54 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-07-11 03:00:14 -0500

Seen: 3,208 times

Last updated: Jul 16 '14