The page you are looking for is temporarily unavailable. Please try again later. (HTTP Status code 499 and 504)

Francis Daly francis at daoine.org
Sun Jul 26 21:22:02 UTC 2020


On Thu, Jul 23, 2020 at 10:50:29PM +0530, Kaushal Shriyan wrote:

Hi there,

> >      location /prod {
> >          proxy_set_header   X-Forwarded-For $remote_addr;
> >    proxy_set_header   Host $http_host;
> >    proxy_pass
> > https://vpc-prod-search-zvf8bfaabstcc6gi7sklqh7ll4.us-west-1.es.amazonaws.com
> > ;
> >                 }

> >         error_page 500 502 503 504 /50x.html;
> >             location = /50x.html {
> >         }

> When I hit http://14.217.10.21/prod <http://34.247.80.31/prod> I am seeing
> the below issue in nginx access log (/var/log/nginx/access.log)
> 
> 114.18.113.6 - - [23/Jul/2020:17:14:35 +0000] "GET /prod HTTP/1.1" *499* 0
> "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36
> (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36" "-"

"499" there means that the client closed the connection with nginx before
nginx successfully sent things to the client.

There's nothing nginx can do about that, other than
break the nginx connection to upstream if you want it to
(http://nginx.org/r/proxy_ignore_client_abort).

> 114.18.113.6 - - [23/Jul/2020:17:15:35 +0000] "GET /prod HTTP/1.1" *504*
> 3693 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36"
> "-"

"504" is Gateway Timeout: nginx failed to get an answer from the upstream
(https://vpc-prod-search-zvf8bfaabstcc6gi7sklqh7ll4.us-west-1.es.amazonaws.com)
for the request "/prod" in the time that it was allowed.

> [image: image.png]

That image presumably shows your /50x.html file, which you have configured
to be shown for any of the listed 500-series error codes.

For the 504 -- can you connect to that upstream from the nginx server? Is
there anything extra in the nginx error log? Does, for example, the
hostname resolve now to the same IP address that it resolved to when
nginx started?

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list