5.6.7 Setting the communication timeout when sending and receiving a response (When the Smart Composer functionality is not used)
You set the communication timeout for sending and receiving responses between the Web container and the redirector and between the Web server and the client.
The following are the methods for setting a communication timeout in each of the cases:
- Organization of this subsection
(1) Settings in the Web container for sending responses
In the Web container, you specify the communication timeout for the process of sending a response from the Web container to the redirector. Set the waiting time for sending a response from the Web container in the following file:
-
usrconf.properties
Set the timeout (seconds) for sending a response from the Web container in the webserver.connector.ajp13.send_timeout key. The default value is 600 seconds.
(2) Settings in the redirector for receiving responses
Set the communication timeout when the redirector receives a response from the Web container, to the redirector.
(a) How to set
Set the waiting time for the response from the Web container in the following file:
-
workers.properties
Set the response waiting time (seconds) for each worker in the worker.worker-name.receive_timeout key. If you want to set a communication timeout for J2EE applications, define and map workers for each J2EE application.
(b) Precautions for setup
You can detect Web application failure by a timeout in receiving a response in the redirector. Therefore, depending on the operation state, consider the time required for processing Web applications and set a value from which failure can be detected as the communication timeout value.
Take the following into the consideration when you set the timeout value for receiving responses in the redirector:
-
Set a time longer than the time required for processing the Web applications in the communication timeout.
If the set timeout value is shorter than the Web application processing time, the timeout is determined in the redirector and an error is returned to the client even if the Web application is processing normally.
-
Consider the waiting time based on the controlling of the number of concurrently executing threads at the peak of the Web container.
Because of the controlling of the number of concurrently executing threads, at the peak of the Web container, there might be requests awaiting processing. Therefore, if server management commands are used to specify the control of the number of concurrently executing threads, you must specify the communication timeout considering the extension of the request processing time. For details on settings for controlling the number of concurrently executed threads for each Web container, see 5.11 Controlling the number of concurrently executing threads in the Web container. For details on settings for controlling the number of concurrently executed threads for each Web application, see the manual uCosminexus Application Server Web Container Functionality Guide. For details on settings for controlling the number of concurrently executed threads for each URL group, see the manual uCosminexus Application Server Web Container Functionality Guide.
-
When failure occurs in the Web container while the data is being sent to the redirector, 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.
(3) Settings in the Web server for sending responses
In the Web server, you can set the communication timeout for sending a response to the client.
(a) How to set
Set the waiting time for the response from the client in the following files:
-
httpsd.conf (In Cosminexus HTTP Server)
Set the communication timeout in the Timeout directive. Note that the communication timeout specified in the Timeout directive is specified both as the communication timeout for the request receiving process and the communication timeout for the response sending process. Therefore, you cannot set the different time for the communication timeout of the request receiving process and for the communication timeout of the response sending process.
For details on the communication timeout for the process of receiving requests from clients, see 5.6.4(1) Settings in the Web server for receiving requests.
-
MinFileBytesPerSec property (In Microsoft IIS)
Set the communication timeout in the MinFileBytesPerSec property. In the MinFileBytesPerSec property, specify the throughput (byte/second) of the response data sent from the Web server to the client. The communication timeout occurs when the response data throughput falls below the value set in MinFileBytesPerSec. Note that, the default value for a communication timeout is 240 byte/second.
For details on the settings, see the manual Microsoft IIS.
(b) Precautions for setup
To set the timeout for sending responses in the Web server, take into consideration the network configuration and traffic status between the client and the Web server and specify adequate time for sending and receiving data with the client.
Also, as the timeout value set in the Web server for sending responses, specify a value smaller than the timeout value in the Web container for sending responses. If the timeout for sending responses in the Web server is greater than timeout for sending responses in the Web container, when failure occurs between the client and the Web server, the timeout in the Web container for sending a response to the redirector might occur earlier than the timeout in the Web server for sending response to the client. In this case, one cannot determine whether the failure has occurred between the client and the Web server or between the redirector and the Web container.