# Problem with HAPROXY configuration



## leboeuf (Mar 10, 2011)

Hi everybody,
I follow a documentation for installing HAPROXY. It works, I just need to create a configuration file. So after creating this file I do:

```
haproxy -f /etc/haproxy.conf
```
 And I have this problem :


```
[ALERT] 068/173101 (1223) : parsing [/etc/haproxy.conf:3] : maxconn value 5000 too high for this system.
Limiting to 1024. Please use '-n' to force the value.
```

So could you help me to unlimit the maxconn value. I don't know how to do that. The rules are good, it's just that my system is limited at 1024. How can I fix it ?


----------



## SirDice (Mar 10, 2011)

leboeuf said:
			
		

> I follow a documentation for installing HAPROXY.



net/haproxy?

Configuration files for ports/packages are not supposed to be in /etc/ but in /usr/local/etc/

I have the distinct feeling you didn't install it the proper FreeBSD way.


----------



## leboeuf (Mar 10, 2011)

I follow this website:
http://www.softwareprojects.com/res...nd-configure-haproxy-as-an-http-loa-1752.html

That's just the configuration file which is in /etc/. I can put him on /usr/local/etc/ but I'm not sure that is the problem.


----------



## SirDice (Mar 10, 2011)

Don't install software that way. Use the proper way.

Chapter 4 Installing Applications: Packages and Ports


----------



## leboeuf (Mar 10, 2011)

I think that's not the problem. The installation seems good. It's the only error in my configuration file, the problem is that my system is limited.
When I make:

```
haproxy
```
I obtain :

```
HA-Proxy version 1.4.13 2011/03/09
Copyright 2000-2010 Willy Tarreau <w@1wt.eu>
```
So I think that the installation is correct. I just want to unlimit the maxconn value. The solution is adding an option/value in the kernel? In sysctl.conf, loader.conf?


----------



## sixtydoses (Mar 10, 2011)

Probably you can try to lower down the value of maxconn in haproxy.conf? I'm running net/haproxy too, and I don't have such issue. I installed it from port, and I suggest that you use the haproxy from the ports tree as well, since it is the proper way to install it on FreeBSD, plus it will make it easier for you to update it in future.

And like SirDice mentioned in previous post, it is better for you to put your configuration file in /usr/local/etc, since configuration files for ports/packages reside there, and not in /etc. If you install it from port, that's where the configuration file will be placed.


----------

