Documentation Center

Setting the Apache Tomcat web server timeout

You can increase the timeout setting on any instance of the Apache Tomcat web server to reduce the risk of a Server 502 - Bad Gateway error during a search operation executed by a Contenta S1000D tool.

About this task

This error is likely caused by an HTTP request to the Apache Tomcat web server timing out during a search operation executed by the tool. If this is the case, increase the timeout setting for such requests by editing the Apache_home/conf/workers.properties file as follows.

Procedure

  1. Open the Apache_home/conf/workers.properties file for editing.
    In this file, each instance of Tomcat is specified in a comma separated worker.list entry. In the following example, ajp13 is the sole worker/instance. The four worker.ajp13 entries specify how the mod_jk connector is to connect with the instance named ajp13.
    worker.list=ajp13
    worker.ajp13.port=8009
    worker.ajp13.host=localhost
    worker.ajp13.type=ajp13
    worker.ajp13.secret=SECRET
    If users encounter a Server 502 - Bad Gateway error when using a Contenta S1000D tool, the workers.properties file likely contains one or more properties limiting the response timeout time, such as the following, which sets the timeout for the ajp13 worker/instance to 60 seconds.
    worker.ajp13.socket_timeout=60
  2. Change this setting to a larger number, or to 0 (the default) to cause the mod_jk connector to wait for a response for an infinite amount of time.
    If no properties in the workers.properties limit the socket timeout, the 502 error is not caused by a mod_jk timeout.
  3. Save and close the Apache_home/conf/workers.properties file.
  4. Restart the Apache Tomcat web server.