Hi Tim, On Mon, Apr 02, 2018 at 04:38:30PM +0200, Tim Düsterhus wrote: > Nikhil, > > Am 26.03.2018 um 08:07 schrieb Nikhil Kapoor: > > Above output shows that maxconn value is "4294967295" which is taken > > randomly. > > This is not random. What you are seeing is unsigned integer wrap around. > It's 4294967296 (2^32) added to your negative argument. > > > Is this a bug? If not then why haproxy behaves abnormally for these values? > > Can we enhance the check for which will prompt user from not having a > > negative value of "maxconn" as done for others(such as "inter")? > > > > While I was preparing a patch for this I noticed that variables called > `maxconn` are sometimes unsigned and sometimes signed. > > Willy, global.maxconn is signed, while proxy.maxconn is unsigned. Is this > intentional?
Very likely not, I think that maxconn is 0 when not set, so most likely it's a leftover from old code. Willy

