How do you install these patches into a working environment on ubuntu?
 
I am on version 1.4 but was curious how to do a patch install ?

--- On Wed, 2/16/11, Willy Tarreau <w...@1wt.eu> wrote:

From: Willy Tarreau <w...@1wt.eu>
Subject: Re: HAproxy can't seem to bind to more than 1000 ports?
To: "John Carter" <supp...@loadbalancer.org>
Cc: "Malcolm Turnbull" <malc...@loadbalancer.org>, haproxy@formilux.org
Date: Wednesday, February 16, 2011, 5:10 AM

Hi John,

On Wed, Feb 16, 2011 at 09:51:31AM +0000, John Carter wrote:
> After a bit more experimenting - I have found that number of ports which
> haproxy can listen on is set by the number of file handles per process.
> 
> On linux systems this is set at 1024 by default, hence the limit 1024,
> however this can be changed by editing :
> 
> /etc/security/limits.conf
> 
> where it is possible to change the value for the number of open file handles
> per process

But my concern is that it's exactly what haproxy is doing itself by doing
a setrlimit() upon startup. Thus I still fail to understand why it does
not work in your case.

Hmmm looking at the code I think I have an idea. It looks like the IP ranges
only reserve one socket (1 per "bind" line instead of one per port).

OK I found it. It was even worse than that. The setrlimit() is called AFTER
binding all the ports ! So it means that in your case, only the system's
limits are considered :-(

I've successfully reproduced your case and confirmed the attached patch fixes
it. I'll merge it, so feel free to apply it to your version.

Thanks for the report,
Willy




      

Reply via email to