Start a conversation

Apache Tomcat ConnectionTimeout for the Object Browser in ServiceGateway

Article Original Creation Date: 2016-02-18

Overview

Few device types have troubles during Object Browsing or Real Time Probes via the ServiceGateway GUI. The front_end stops communication with the device if it takes more than 20 seconds to respond and few device types sometimes need more than 20 seconds to answer a request from the ServiceGateway application.

In traces from the device side, taken by the device vendors, it appears the connection from ServiceGateway was already cut off by the time the device responded.

Environment

  • Red Hat Linux 6.3
  • JBoss 6.1.0 Final
  • Apache-tomcat 7.0.27
  • ServiceGateway (SG) 4.3.1

Root Cause

After several investigations of the communication between the device and the front_end, Wireshark captures (it was not visible in the ServiceGateway available logging) determine that in several cases the connection was cut-off by the front_end after exact 20 seconds.

Please check line 60 and 61 in the screenshot below:


Resolution

To solve the issue, update the Apache Tomcat's connectionTimeout parameter, the ACS and ACS API connectors, to 30000 from 20000 in

$Apache_home/conf/server.xml

for each front_end.

Apache Tomcat defines connectionTimeout parameter as follows:

connectionTimeout

The number of milliseconds a Connector will wait, after accepting a connection, for the request URI line to present. Use a value of -1 to indicate no (i.e., infinite) timeout. The default value is 60000 (i.e., 60 seconds) but note that the standard server.xml that ships with Tomcat sets this to 20000 (i.e., 20 seconds). Unless you configure disableUploadTimeout to false, this timeout is applicable when reading the request body (if any).


Check Apache Tomcat HTTP Connector documentation for more details.

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments