Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My HAProxy instance isn't even under any serious load right now, but occasionally it will start refusing to accept connections, even though the backend servers are up and running fine. I didn't see anything in the logs either. Am I missing something important from my configuraiton?

        log   local0
        log   local1 notice
        #log loghost    local0 info
        maxconn 4096
        chroot /var/lib/haproxy
        user haproxy
        group haproxy

        log     global
        mode    http
        option  httplog
        option  dontlognull
        retries 3
        option redispatch
        maxconn 2000
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000

frontend http-in
        bind *:80
        acl host_staging hdr_end(host) -i
        acl host_prod hdr_end(host) -i

        acl url_wiki url_beg /wiki
        acl url_go   url_beg /greenapp

        use_backend kumquat if host_staging url_wiki
        use_backend kumquat if host_staging url_go
        use_backend cumberland if host_staging

        default_backend cumberland

backend kumquat
        server kumquat maxconn 1000

backend cumberland
        server cumberland maxconn 1000
share|improve this question
up vote 2 down vote accepted

It turns out my problem had nothing to do with HAProxy. I tried Nginx and ran into the same problem. I then tried running a different distribution: CentoOS, and even after I shut down the old machine, when CentOS booted up it said the IP address was still in use. I had another VM I had forgotten to shut down which had the same IP address. openSUSE doesn't do checking to make sure another machine with the same IP doesn't exist on the network. They were conflicting with each other.

share|improve this answer

Do you have anything else on that box that could be consuming TCP connections that could be causing this? You might have to look at turning your TCP limits, here is a link that might or might not be useful

share|improve this answer
I added the kernel networking configuration options from that guide and my HAProxy server hasn't been dropping any connections since. There are no other services running on that machine other than HAProxy and SSH, so I think the default TCP limits were just too low in openSUSE. – djsumdog Aug 30 '11 at 13:37
I spoke too soon. It looks like my server is dropping connection again, even with those sysctrl settings changed. The server isn't even a large amount of load. If I poin the DNS directory at those servers, they handle the load fine – djsumdog Aug 31 '11 at 3:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.