Hi,

I am using haproxy with Apache to keep alive an EC2 server. Sometimes
haproxy stops taking new requests during this period we can't open our
website, If I reload haproxy service it starts working normally. I have
disabled iptables and increased open file limit but no luck. Below is my
configuration.
Please guide me to what I did wrong.


#####################################

global
    log 127.0.0.1   local5
    maxconn   190001
    daemon
    nbproc      2
    stats bind-process 1
    stats socket /tmp/haproxy level admin
    debug

    defaults
    log global
    timeout server 86400000
    timeout connect 86400000
    timeout client 86400000
    #timeout queue   30s
    #timeout tarpit 60s
    #timeout client  30s
    #timeout connect 30s
    #timeout server  30s
    #option abortonclose
    #option httpclose
    mode    http
    option  httplog
    #option  dontlognull
    option forwardfor
    #option http-server-close
    #timeout http-keep-alive 30s

    stats enable
    stats hide-version
    stats show-desc Master Server
    stats auth admin:password
    #stats auth admin:admin
    stats uri /haproxyStats
    stats refresh  15s

    #errorfile 503 /etc/haproxy/maintenance.html

    frontend HTTP
    bind 0.0.0.0:80

    acl network_allowed src 1.1.1.1

    acl restricted_page path_beg /blog/wp-admin
    block if restricted_page !network_allowed

    reqadd X-Forwarded-Proto:\ http

    acl is_blog url_beg  /blog
    use_backend Blog if is_blog

    default_backend Apache-Cluster
    bind-process    2

    frontend HTTPS
    bind 0.0.0.0:443 ssl crt /etc/ssl/crt.com.pem
    reqadd X-Forwarded-Proto:\ https
    bind-process    2
    default_backend Apache-Cluster
    acl is_blog url_beg  /blog
    use_backend Blog if is_blog

    backend Apache-Cluster
    redirect prefix http://www.example.com code 301 if { hdr(host) -i
example.com }
    #redirect scheme https if !{ ssl_fc }
    redirect scheme https  if !{ ssl_fc }  { path_beg -i /order/checkout }

    balance source
    option httplog
    option abortonclose
    option httpclose
    option forwardfor
    cookie LOADBAL  insert
    option httpchk GET /working.php
    server APPA 10.0.0.11:80 cookie APPA weight 50 maxconn 40000
check inter 4000 rise 2 fall 2
    server APPB 10.0.0.12:80 cookie APPB weight 50 maxconn 40000
check inter 4000 rise 2 fall 2

    backend Blog
    mode http
    option httplog
    option abortonclose
    option httpclose
    option forwardfor
    cookie LOADBAL  insert
    server BLOG 10.0.0.12:80 cookie BLOG weight 50 maxconn 512

Reply via email to