Knowledge Search


[JWAS/Mykonos] Webpage times out with "504 gateway timeout" when going through JWAS

  [KB29014] Show Article Properties

Webpages which take longer time to respond might get timed out when going through JWAS, this KB provides the cause and resolution for such kind of timeout issues.
Users get "504 gateway timeout" when downloading or pulling the reports from webserver which is being protected by JWAS
By default the JWAS allows 60secs of time for HTTP requests and responses that go through JWAS. If a request and response takes longer than that, the webpage can get timedout.
Usually when users pull reports or data from a webserver for a timeperiod ranging several days, the response will be pretty longer, upto 15mins or more depending upon the volume of data being pulled. In such case the web request can get timeout with "504 gateway timeout" error. To resolve this issue, there are two options.

1. Exclude the sub-url from JWAS processing
2. Increase the JWAS HTTP request and response timeout value

To implement option# 1, contact JTAC
To implement option# 2, below are the commands:

[mykonos@JWAS-116 ~]$ sudo mykonos-shell
Welcome to the Junos WebApp Secure CLI
> config
config> show services.http.timeout.request
config> set services.http.timeout.request ?
services.http.timeout.request must be an integer followed by one of ms, s, m, h, or d.
config> set services.http.timeout.request 15m
config> set services.http.timeout.response 15m

Above commands set the http request and response timeout values to 15 minutes. If report pulling takes longer than 15min, increase the values appropriately.

Related Links: