I've tried to setup haproxy on Ubuntu 12.04 LTS. My HaProxy Version is:
root@node01:~# haproxy -v HA-Proxy version 1.4.18 2011/09/16 Copyright 2000-2011 Willy Tarreau <[email protected]> I've tried to do lot's of things to got it running, but I tried endlessy. I only wanted to setup HAProxy which proxies Requests to my floating IP that runs over Heartbeat. It was really simple, every backend Apache2, Mysql and Elasticsearch has a bind IP and HAProxy has another Bind IP and when one server drops, the floating IP will be given to another server, voila i had High Availability and load Balancing. Currently I have a third server in the background, but he only runs a smaller version of MySQL and Elasticsearch to avoid split brain conditions. But since he is underpowered he shouldn't be seen by any client. But still I got my configuration working. But then I had some strange behaviors. My Backends always got some Strange 500 Errors. I looked up everything, even debug modes of HAProxy, Mysql, Apache2 and I've found nothing. I've checked Server consumption. Via Landscape, top, free -m, everything was okai, I mean two Server with 48 GB of RAM and 24 Cores per Server + 2 HDDs for Apache2 RAID1 and 4 HDDs as RAID10 for Mysql Galera Replication should be enough for serving 1000 Requests/s or even less. (way less). Memory consumption was balanced at around 4 GB. And CPU Consumption... 0,000001%. Even less. Memory Consumption didn't exceed 8% on these two servers, so everything was fine. Except that still a shitload of my requests got killed, when running them over HAProxy. On Ubuntu Haproxy coming with these settings: # Set ENABLED to 1 if you want the init script to start haproxy. ENABLED=0 # Add extra flags here. #EXTRAOPTS="-de -m 16" 16 Megabyte, that seems to be really less, but it should be fine. Howeever should... Still that couldn't be the problem since I changed the value to this: # Set ENABLED to 1 if you want the init script to start haproxy. ENABLED=1 # Add extra flags here. #EXTRAOPTS="-de -m 4096" So 4096 Megabyte of Memory should be more than enough. Even MySQL and / or Apache2 had way less allocated. Still my requests got lost in the place of nowhere. Later I run haproxy via the command line to see a debug log, everything worked. Everything. I removed-m and everything worked as expected. Can somebody help me and saying what i've did wrong, did i've run into a Bug? Which bug? I mean there isn't even a Fix in newer versions. Could I still turn on Memory Allocation for HAProxy? I mean it isn't necessary that much since I think that I will never every hit more than 50% of the memory cap. Still it would be cool to control HAProxy a little bit more.

