0

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?

global
        log 127.0.0.1   local0
        log 127.0.0.1   local1 notice
        #log loghost    local0 info
        maxconn 4096
        chroot /var/lib/haproxy
        user haproxy
        group haproxy
        daemon
        #debug
        #quiet

defaults
        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 staging.example.com
        acl host_prod hdr_end(host) -i example.com

        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 kumquat.example.com:8080 maxconn 1000

backend cumberland
        server cumberland cumberland.example.com:80 maxconn 1000

2 Answers 2

1

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.

0

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

http://www.acc.umu.se/~maswan/linux-netperf.txt

2
  • 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, 2011 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, 2011 at 3:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .