"Bad Gateway" problems

Dave Cheney dave at cheney.net
Wed Jun 11 03:13:33 MSD 2008


What does the nginx error log say.

Also, i thin you have mistaken the meaning of fail timeout, it is not  
the amount of time nginx will wait until a backend is considered  
failed, but also *how long nginx will quarentine a failed backend*, in  
your case 5 minutes every time the backend barfs.

http://wiki.codemongers.com/NginxHttpUpstreamModule#server

I think you'll find your error log is full of lines that say things  
like, 'no live upstream servers were found'

Cheers

Dave

On 10/06/2008, at 7:26 PM, Björn Keil wrote:

> Hello,
>
> I've been trying out nginx as reverse proxy, SSL wrapper and load
> balancer on our internal site for now.
>
> The problem I have is that if some backend servers are down I keep
> getting "Bad Gateway" errors, even if there are backend servers  
> online.
> In the setup at had I had the setting like:
>
> upstream intern.mysite.tld {
> 	server 10.120.5.1:8080 max_fails=3 fail_timeout=300;
> 	server 10.120.5.2:8080 max_fails=3 fail_timeout=300;
> 	server 10.120.5.3:8080 max_fails=3 fail_timeout=300;
> }
>
> Only one of those were available. But despite the relatively high fail
> timeout I got a Bad gateway warning every 3rd or 4th access. Is  
> there a
> way to keep nginx from throwing out so many warnings? When I switch a
> productive environment I need a loadbalancing system that can deal  
> with
> servers that are down...
>
> Björn
>
>
>
>






More information about the nginx mailing list