Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

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



Article ID: KB29014 KB Last Updated: 08 May 2014Version: 1.0
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.

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search