High CPU when upstream server down

Ryan Malayter malayter at gmail.com
Wed Mar 9 00:43:56 MSK 2011

On Tue, Mar 8, 2011 at 2:35 PM, adamn <nginx-forum at nginx.us> wrote:

>            if (!-f $request_filename) {
>                proxy_pass http://dev.example.com;
>                break;
>            }

As they say, http://wiki.nginx.org/IfIsEvil
I've never seen proxy_pass work correcly inside an if block; the fact
that it works for you on 0.8.x seems to be happy coincidence.

Try creating a separate location (maybe regex based if necessary) and
put your proxy_pass statement in there.


More information about the nginx mailing list