mardi 29 mars 2016

haproxy causes users to stop responding all together or they get 504 gateway timeout

I need help. I have a website that allows customers to upload large pdf files one at a time. Some are working just fine and others get 504 Gateway Timeout or just the sites tries to connect for a long time then stops.

When my router was connecting straight to one web server it worked just fine. Now that I have three web servers through haproxy it gives me these problems.

When I restart the haproxy service and the httpd service on all three servers it starts working fine again.

Here is my config file:

global
    log 127.0.0.1 local2
    maxconn 80000
    user haproxy
    group haproxy
    daemon
    tune.ssl.default-dh-param 2048

defaults
    maxconn 80000
    timeout queue 120s
    timeout server 86400000
    timeout connect 86400000
    timeout client 86400000
    timeout queue 1000s

listen examplecom-http
    bind 192.168.1.200:80
    mode http
    redirect scheme https if !{ ssl_fc }

listen examplecom
    bind 192.168.1.200:443 ssl crt /root/.ssl/www.example.com.pem ciphers TLSv1+HIGH:!SSLv2:RC4+MEDIUM:!aNULL:!eNULL:!3DES:@STRENGTH
    mode http
    stats enable
    stats uri /haproxy?stat
    stats realm Stricly\ Private
    stats auth root:password
    balance source
    #option http-server-close
    option http-keep-alive
    timeout http-keep-alive 3000
    reqidel ^X-Real-IP:
    option forwardfor header X-Real-IP
    reqadd X-Forwarded-Proto:\ https
    server srvg-webc-11 192.168.1.21:80 check
    server srvg-webc-12 192.168.1.22:80 check
    server srvg-webc-13 192.168.1.23:80 check

listen mysql
    bind 192.168.1.200:3306
    mode tcp
    option mysql-check user haproxy_check
    balance roundrobin
    server srvg-dbc-11 192.168.1.31:3306 check
    server srvg-dbc-12 192.168.1.32:3306 check
    server srvg-dbc-13 192.168.1.33:3306 check

listen fileserver
    bind 192.168.1.200:445
    mode tcp
    balance source
    server srvg-fsc-11 192.168.1.51:445 check
    server srvg-fsc-12 192.168.1.52:445 check

listen email
    bind 192.168.1.200:25
    mode tcp
    balance roundrobin
    server srvg-emlc-11 192.168.1.41:25 check
    server srvg-emlc-12 192.168.1.42:25 check
    server srvg-emlc-13 192.168.1.43:25 check



Aucun commentaire:

Enregistrer un commentaire