upstream backend {
server 10.10.2.100:8088 max_fails=200 fail_timeout=10;
server 10.10.2.101:8088 max_fails=200 fail_timeout=10;
server 10.10.2.102:8088 max_fails=200 fail_timeout=10;
server 10.10.2.103:8088 max_fails=200 fail_timeout=10;
}
On my production, in the cases a server of upstream response http_504,
but the request doesn’t to be transmitted to the next server, nginx
response http 504 to client.
On Thu, Dec 29, 2011 at 02:45:42AM -0500, defage wrote:
open_file_cache_min_uses 2;
server {
add_header Cache-Control
response http 504 to client.
A request is passed to a next server only if not all (alive)
upstream servers were tried yet. Otherwise response from last
tried server will be returned.
you mean at that moment all of upstream server has to tried,and it
reponse 504? but at that moment only one app server’s log throw error
info.
A part of access_log like:
10.001 10.001 /cas/login 10.10.2.100:8080 504
10.001 10.001 /cas/login 10.10.2.100:8080 504
If pass to all servers, the log is like below:?
10.001 10.001 /cas/login 10.10.2.100:8080, 10.10.2.101:8080,
10.10.2.102:8080, 10.10.2.103:8080 504
the problem is my app server 's log show ,at that moment only one server
of upstream have 504 error.
On Thu, Dec 29, 2011 at 04:07:41AM -0500, defage wrote:
the problem is my app server 's log show ,at that moment only one server
of upstream have 504 error.
It looks like you are trying to handle timeouts, not 504 returned
by an upstream server. You have to specify “timeout” in
proxy_next_upstream directive, not “http_504”.
Or better just remove the proxy_next_upstream directive from your
config, default value “error timeout” is good enough in most
cases.
Maxim D.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.