Proper display of a "server overloaded" page

Maxim Dounin mdounin at mdounin.ru
Mon Mar 24 11:51:26 UTC 2014


Hello!

On Mon, Mar 24, 2014 at 06:20:03AM +0000, Riedel Sven wrote:

> Hi,
> I want to set up a small static HTML Page that informs visitors that our
> site is currently under load if an appserver cannot handle the request
> within N seconds.
> 
> What would be the proper way to do this? Just set up a 504.html error
> page? And what are the different conditions when nginx will return a 503
> vs a 504?
> Are there subtle behavioral differences between a proxy_pass statement and
> an upstream pool definition?

There two errors which can be returned by proxy module in case of 
upstream problems: 502 (if an error occurs) and 504 (if a request 
times out).  Usually it's good idea to handle both of them.

The 503 code is never used by proxy, it's only returned by 
limit_conn / limit_req.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list