Haproxy 504 Gateway Timeout Error
Contents |
Hi, We have recently migrated our game servers from Linux to FreeBSD. We have 8 web servers running in jails, with HAProxy as load balancer. We also
Haproxy Srvtimeout
have CARP configured in case of network failover. carp is running as master on haproxy timeout server the 1st server(webm01), and backup on the 2nd server(webm02). haproxy on both servers are actively running, though only one is working haproxy 504 gateway timeout the server didn t respond in time at a time, depending on which server with carp acting as master. Both servers have pf running as well. We are running FreeBSD 8.2-RELEASE, haproxy-1.4.15, apache-2.2.19 and the game is php coded. Our network
Haproxy 503 Error
architecture is as follows. There is a backend database running as well on a jail in a different server, which I excluded from the diagram (hope the ascii diagram will be displayed well in the mail): +----- wj01 | (webm01) |------ wj02 user -------- carp -------- haproxy ------+ | |------ wj03 | | | +----- wj04 | | +----- wj05 | | | |----- wj06 carp -------- haproxy ------+ (webm02)
Haproxy Increase Timeout
|----- wj07 | +----- wj08 Our main problem at the moment is a lot of users (more than a hundred users) have complained that they are getting a "504 Gateway Timeout" error. This normally happens at night (CEST), when most players start playing the game. However, the load of our servers are consistently low at all time. At the moment there is no obvious pattern as to when this error occurs. Here is our haproxy.conf: global log /var/run/log local0 notice maxconn 4096 daemon chroot /var/run/haproxy user haproxy group haproxy stats socket /var/run/haproxy/haproxy.sock uid 1005 gid 1005 defaults log global mode http option httpclose option forwardfor option httplog option tcplog option dontlognull option tcpka retries 3 option redispatch maxconn 2000 timeout connect 5000 timeout client 50000 timeout server 50000 listen webjailfarm 78.xx.xx.xx:80 mode http cookie SERVERID insert nocache indirect balance roundrobin option httpclose option forwardfor option httpchk HEAD / HTTP/1.0 stats uri /haproxy-status stats enable stats auth admin:password server wj01 192.168.30.10:80 http://192.168.30.10/ cookie A weight 10 check inter 2000 rise 2 fall 2 server wj02 192.168.30.20:80 http://192.168.30.20/ cookie B weight 10 check inter 2000 rise 2 fall 2 server wj03 192.168.30.30:80 http://192.168.30.30/ cookie C weight 10 check inter 2000 rise 2 fall 2 server wj04 192.168.30.40:80 http://192.16
Sign in Pricing Blog Support Search GitHub This repository Watch 30 Star 325 Fork 131 tutumcloud/haproxy Code Issues 39 Pull requests 2 Projects 0 Pulse Graphs New issue HAProxy haproxy logs 504 with configuration that used to work #133 Closed awsmsrc opened this Issue
504 Gateway Timeout Apache
Dec 30, 2015 · 3 comments Projects None yet Labels None yet Milestone No milestone Assignees haproxy http-server-close No one assigned 3 participants awsmsrc commented Dec 30, 2015 Hey gang, I have been really enjoying using tutum. I have tried through the slack community, twitter and the support email to http://www.serverphorums.com/read.php?10,345566 get a response as I didn't want to spam the github account with issues. For some reason about a week ago haproxy started timing out. There is nothing obvious that has changed in my configuration and there is nothing obvious in the logs of haproxy (forwarded to papertrail) My app is accessible by using the service endpoint provided by tutum Any help appreciated Levino commented https://github.com/tutumcloud/haproxy/issues/133 Jan 2, 2016 Are there no logs you can share? What is the backend? HTTP servers? What domain is your app running on? tutum member tifayuki commented Jan 4, 2016 504 Gateway timeout returned in Haproxy means that haproxy forwards the request to your application, but it cannot receive the response in time. It could be a network issue, but mostly there could be a bug on the user's application side. If nothing is changed, I mean both on your application and the haproxy container, it could be the issue/bug of haproxy program itself. Can you try to redeploy the haproxy container to see if it is fixed. awsmsrc commented Jan 4, 2016 hey sorry guys as i said i didn't want to spam here. Ive figured it out and, predictably, it was my fault. The timeout in HAProxy was a lot lower then the timeout in my db connection code ;) Apologies, loving tutum so far awsmsrc closed this Jan 4, 2016 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, In
Open Source HAProxy Join the Community! Creating your account only takes a few minutes. Join Now I have 3 nodejs web-servers https://community.spiceworks.com/topic/1596504-haproxy-with-ssl-termination-times-out-504-error-with-large-post-bodies spun on an ubuntu box and HAproxy to load-balance those servers on the same box. HAproxy listens at port 80(http) and 443(https, with SSL termination). There's no SSL between the http://serverfault.com/questions/647060/haproxy-timeout-http-request-vs-timeout-http-keep-alive-vs-timeout-server HAproxy server and the web-servers. The POST call to one of the api without SSL, passes through with any value of content-length, but when I try to do the 504 gateway POST call with a content-length greater than 8055 on the HAproxy with SSL connection(port443), HAproxy times out giving a 504 Gateway Timeout error. Also, if I give an "Expect:100 continue" header to the curl command, the server responds with some delay, which I don't want to exist. Below is how the HAproxy config file looks like: BASHglobal stats socket /var/run/haproxy.sock 504 gateway timeout mode 0777 log 127.0.0.1 local0 info log 127.0.0.1 local1 info chroot /usr/share/haproxy uid nobody gid nobody nbproc 1 daemon maxconn 50000 frontend localnodes:https bind *:443 ssl crt /etc/ssl/private/443_private_ssl_in.pem no-sslv3 mode http reqadd X-Forwarded-Proto:\ https default_backend nodes timeout client 30000 frontend localnodes-http bind *:80 mode http reqadd X-Forwarded-Proto:\ http default_backend nodes timeout client 30000 backend nodes mode http balance roundrobin option forwardfor http-request set-header X-Forwarded-Port %[dst_port] http-request add-header X-Forwarded-Proto https if { ssl_fc } option httpchk HEAD / HTTP/1.1\r\nHost:localhost log global timeout connect 3000 timeout server 30000 option httplog option ssl-hello-chk option httpchk GET / http-check expect status 404 server nodejsweb01 127.0.0.1:8000 check server nodejsweb02 127.0.0.1:8001 check server nodejsweb03 127.0.0.1:8002 check I have ensured that the nodejs web-servers behind have no problem, they work fine. I have tried increasing the 'timeout server' period, no effect. Also tried a solution on this link that tells to give an option ssl ca-file to the backend nodes, as follows: BASHserver nodejsweb01 127.0.0.1:8000 ssl ca-file /etc/ssl/certs/ca.pem check server nodejsweb02 127.0.0.1:8001 ssl ca-file /etc/ssl/certs/ca.pem check server nodejsweb03 127.0.0.1:8002 ssl ca-file /etc/ssl/certs/ca.pem check but after this option HAp
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Haproxy - timeout http-request vs timeout http-keep-alive vs timeout server up vote 4 down vote favorite 1 I'm trying to wrap my head around how the haproxy options timeout http-request