5.6.4 Setting the communication timeout when sending and receiving a request (When the Smart Composer functionality is used)
You set the communication timeout for sending and receiving requests between the client and Web server and the redirector and Web Container.
The following are the methods of setting a communication timeout in each of these cases:
- Organization of this subsection
(1) Settings in the Web server for receiving requests
Specify the communication timeout in the Web server, when receiving the requests from the client into the Web server. You can use Cosminexus HTTP Server as the Web server.
(a) How to set
Set the communication timeout for the receiving process of requests forwarded from the client in httpsd.conf.
-
Waiting time for the request receiving process
In the Timeout directive, set the waiting time (seconds) for the process of receiving requests from the client. The default value of the Timeout directive is 300 seconds. Note that the value set here is shared with the communication timeout for the process of sending data to the client. For details on the communication timeout for the process of sending data to the client, see 5.6.6(3) Settings in the Web server for sending responses.
(b) Precautions for setup
To set the timeout for receiving requests in the Web server, take into consideration the network configuration and traffic status between the client and the Web server and specify a time in which the occurrence of failure can be determined.
(2) Settings in the redirector for sending requests
When sending a request from the redirector to the Web container, first establish a connection with the Web container. You can set the communication timeout for sending requests from the redirector to the Web container when the connection is established and when the request is sent. You can also set the retry frequency to be used when an attempt to establish connection and to send the request header fails.
(a) How to set
Specify the communication timeout for establishing the connection and the request sending process and the retry frequency from the redirector in the Easy Setup definition file.
-
Communication timeout in establishing connection
Set the waiting time (seconds) for the process of establishing a connection with the Web container in the JkConnectTimeout parameter in the <configuration> tag of the logical Web server (web-server). The default value of the JkConnectTimeout parameter is 30 seconds.
-
Timeout for the request sending process
Set the waiting time (seconds) for the process of sending a request to the Web container in the JkSendTimeout parameter in the <configuration> tag of the logical Web server (web-server). The default value of the JkSendTimeout parameter is 100 seconds.
-
Retry frequency for establishing a connection and sending a request
Set the retry frequency for establishing a connection and sending a request to the Web container in the JkRequestRetryCount parameter in the <configuration> tag of the logical Web server (web-server). The default value of the JkRequestRetryCount parameter is three times.
(b) Precautions for setup
Take the followings into consideration when you specify the communication timeout value for sending requests and the retry frequency set up in the redirector:
-
The retry frequency includes the first connection established and the first request sent. Therefore, if the first connection or request sending process fails, the retrying of connection or request sending process is counted as the second time.
-
If you specify 0 as the communication timeout for establishing a connection and for the request sending process or if you set a longer time than the re-send timer for establishing a connection and sending data by TCP, the TCP timeout value is applied to communication timeout value.
(3) Settings in the Web Container for receiving requests
Set the communication timeout when the Web container receives a request from the redirector, to the Web container.
(a) How to set
Set the communication timeout for the process of receiving requests forwarded from the redirector in the Easy Setup definition file:
-
Timeout for the request receiving process
Set the waiting time (seconds) for the process of receiving requests from the redirector in webserver.connector.ajp13.receive_timeout parameter in the <configuration> tag of the logical J2EE server (j2ee-server). The default value of the parameter is 100 seconds.
(b) Precautions for setup
Take the followings into the consideration when you specify the timeout value set in the Web container for receiving requests:
-
Set a value bigger than the time set in the timeout for receiving Web server requests.
If a value smaller than the time specified as the timeout for receiving Web server requests is set, when network failure occurs in the client and between the client and Web server, timeout occurs in the Web container before the Web server. In this case, one cannot determine whether the failure has occurred in the Web server or in the client.
-
If data must be received from the client, set the time in which data can be received taking into consideration the communication speed with the client.
-
When failure occurs in the redirector while the data is being sent to the Web container, the failure is detected by the timeout in the TCP re-send timer.
Note that in UNIX, the time until timeout depends on the OS.