Hitachi

Hitachi Application Server V10 User's Guide (For Windows® Systems)


3.7 Overview of timeout control

Timeout control means setting the timeout for a processing. If the timeout is set, processing is canceled when the processing time exceeds the specified time. This prevents unintended use of resources by a system engineer, and avoids any slowdown of the system for business system users.

Timeout control mechanism

The following figure shows the relationship between the flow of request processing and the timeout period.

[Figure]

Because all call relationships in this figure are synchronized, the nearer the distance to the client, the longer the execution time. Therefore, in order to help identify where a timeout occurred, make sure the timeout value specified for a caller is greater than the timeout value of a called target. In other words, the timeout settings must be as follows: Web Server timeout > Web Server proxy timeout > Java EE server request timeout > transaction timeout.

In addition to the above case, you can also set the connection timeout and request timeout for callers and called targets when you use JAX-RS or JAX-WS to link multiple business programs.

The following describes the timeouts that can be set for Application Server.

Server processing timeouts

The following table describes what is controlled by a server processing timeout and the parameters to be specified.

No.

Item

Controlled item

Control target

Parameter to be specified

1

Web Server timeout

Wait time for sending data to and receiving data from the client

Web Server server process or server thread

Timeout

2

Web Server proxy timeout

Amount of time that elapses before a response is received after a request was sent to the Java EE server

Web Server server process or server thread

ProxyTimeout

3

Java EE server request timeout

Application execution time

Java EE server execution thread

configs.config.configuration_name.network-config.protocols.protocol.configuration_name.http.request-timeout-seconds

4

Transaction timeout

Transaction processing time

Transaction service

configs.config.configuration_name.transaction-service.timeout-in-seconds

5

JAX-WS timeout

Web service execution time

JAX-WS and WebService

configs.config.configuration_name.hitachi-jaxws-config.request-timeout

6

JDBC SQL timeout

SQL execution time

JDBC connection pool

Use one of the following to specify the timeout:

  • --statementtimeout option of the create-jdbc-connection-pool subcommand

  • statement-timeout-in-seconds attribute of /resources/jdbc-connection-pool in glassfish-resources.xml

Important note
How to deal with a transaction timeout

When a transaction times out, the system operator should examine the message KDKD20033-W output to the log, and remove the cause of the timeout.

The message KDKD20033-W is output only when a local transaction times out.

Connection timeout

The following table describes what is controlled by the connection timeout and the parameters to be specified.

No.

Item

Controlled item

Control target

Parameter to be specified

1

JAX-WS connection timeout

Amount of time required to establish a connection with the web service

JAX-WS and WebService

configs.config.configuration_name.hitachi-jaxws-config.connect-timeout

2

JAX-RS connection timeout

Amount of time required to establish a connection with the web service

JAX-RS and Resource

configs.config.configuration_name.hitachi-jaxrs-config.connect-timeout

3

JDBC connection collection timeout

Maximum wait time for collecting a connection from the JDBC connection pool

JDBC connection pool

Use one of the following to specify the timeout:

  • --maxwait option of the create-jdbc-connection-pool subcommand

  • max-wait-time-in-millis attribute of /resources/jdbc-connection-pool in glassfish-resources.xml

Subcommand timeouts for the Java EE server

Processing of subcommands of the asadmin command requires HTTP communication between processes such as the process of the asadmin utility command and the domain administration server process. If the time required for inter-process communication or processing of a subcommand of the asadmin utility command exceeds a preset time, a timeout occurs. The subcommands of the asadmin utility command include local and remote subcommands. The following describes the timeout for each type of subcommand.

For local subcommands

A communication timeout does not occur because local subcommands are processed on the host on which the asadmin utility command is executed. However, for some subcommands for which the command processing timeout can be set, a timeout occurs if the specified timeout value is exceeded.

For remote subcommands

A timeout might occur because remote subcommands are processed on the domain administration server, which involves communication. The following figures show where a timeout might occur when a remote subcommand is executed.

Where a timeout of a remote subcommand might occur (without server instance execution)

[Figure]

When a remote subcommand is executed, the process of the asadmin utility command transfers the subcommand processing to the domain administration server. At this time, the timeout is set for the following processing:

- HTTP-response read processing set for communication from the process of the asadmin utility command to the domain administration server

- Processing of the HTTP request containing the subcommand received from the process of the asadmin utility command

Where a timeout of a remote subcommand might occur (with server instance execution)

[Figure]

When a remote subcommand is executed, the process of the asadmin utility command transfers the subcommand processing to the domain administration server. The domain administration server processes the subcommand received from the process of the asadmin utility command. Then, depending on the command and user-specified options, the same subcommand is also run on the server instance. At this time, the timeout is set for the following processing:

- HTTP-response read processing set for communication from the process of the asadmin utility command to the domain administration server

- Processing of the HTTP request containing the subcommand received from the process of the asadmin utility command

- HTTP-response read processing set for communication from the domain administration server to the server instance

- Processing of the HTTP request containing the subcommand received from the domain administration server

The following table shows subcommand timeout details.

Table 3‒1: Subcommand timeout list

No.

Name

Process that causes a timeout

Target processing

Operation when a timeout occurs

How to set the timeout

1

asadmin utility command read timeout

asadmin utility command process

HTTP-response read processing set for communication from the asadmin utility command process to the domain administration server

  • Execution of the asadmin utility command fails, but subcommand processing continues on the domain administration server. A message indicating the command execution result on the domain administration server (success: KDKD10162-I, failure: KDKD10163-E) is output to the message log of the domain administration server host.#1

  • A message indicating a timeout is displayed on the standard output of the asadmin utility command process.#2

  • An error message (KDKD10164-E) is output to the message log of the asadmin utility command.

Specify the timeout value (in milliseconds) for the environment variable AS_ADMIN_READTIMEOUT for the host on which the asadmin utility command is run.#3

2

Domain administration server request timeout

Domain administration server process

Processing of the HTTP request containing the subcommand received from the asadmin utility command

  • Execution of the asadmin utility command fails, but subcommand processing itself might continue without causing an error.#4

  • A message indicating a subcommand error is displayed in the standard output of the asadmin utility command process.#5

  • An error message (KDKD10165-E) is output to the message log of the domain administration server.

Set the timeout (in seconds) in set parameter (configs.config.configuration_name_of_the_Java_EE_server.network-config.protocols.protocol.listener_name.http.request-timeout-seconds) .

listener_name:

admin-listener (if secure admin is disabled)

sec-admin-listener (if secure admin is enabled)

3

Domain administration server read timeout

Domain administration server process

HTTP-response read processing set for communication from the domain administration server to the server instance

  • Execution of the asadmin utility command fails, but subcommand processing continues on the server instance. A message indicating the subcommand execution result on the server instance (success: KDKD10162-I, failure: KDKD10163-E) is output to the server instance message log.#1

  • A message indicating a subcommand error is displayed on the standard output of the asadmin utility command process.#5

  • An error message (KDKD10164-E) is output to the message log of the domain administration server.

Specify the timeout value (in milliseconds) for the environment variable AS_ADMIN_READTIMEOUT for the domain administration server host. #5

4

Server instance request timeout

Server instance process

Processing of the HTTP request containing the subcommand received from the domain administration server

  • Execution of the asadmin utility command fails, but subcommand processing itself might continue without causing an error.#4

  • A message indicating a subcommand error is displayed in the standard output of the asadmin utility command process.#5

  • An error message (KDKD10165-E) is output to the message log of the domain administration server.

Set the timeout (in seconds) in set parameter (configs.config.configuration_name_of_the_Java_EE_server.network-config.protocols.protocol.sec-admin-listener.http.request-timeout-seconds).

#1:

Some of the subcommands output execution result logs, but others do not. For details on whether a subcommand outputs execution result logs, see the table of subcommands that require a long processing time.

#2:

The following message is output:

No response from Domain Admin Server after timeout_value seconds.
The command is either taking too long to complete or the server has failed.
Please see the server log files for command status.
Command command_name failed.
#3:

The values specified for the asadmin utility command read timeout and domain administration server read timeout are applied to all subcommands. If a timeout occurs when the default timeout values are used, you need to increase the timeout values according to the processing time of the most time-consuming command.

#4:

For details on the subcommands that continue processing if a timeout occurs, see the table of subcommands that require a long processing time.

#5:

The following message is output:

Command command_name failed.

The following table shows subcommands that require a long processing time:

Table 3‒2: Subcommands that require a long processing time

No

Command name

Condition

Execution result logs

Consequences of the request timeout

Number of applications to be deployed

Size of applications to be deployed

Time to wait until the request is finished

Size and number of files to be collected

1

start-domain

Y

--

--

--

The command does not output logs.

The consequences depend on the implementation.

2

stop-domain

Y

--

Y

--

The command does not output logs.

The consequences depend on the implementation.

3

restart-domain

Y

--

--

--

The command does not output logs.

The consequences depend on the implementation.

4

start-instance

Y

--

--

--

The command outputs logs.

The consequences depend on the implementation.

5

stop-instance

Y

--

Y

--

The command does not output logs.

The consequences depend on the implementation.

6

start-cluster

Y

--

--

--

The command does not output logs.

The consequences depend on the implementation.

7

stop-cluster

Y

--

--

--

The command does not output logs.

The consequences depend on the implementation.

8

start-servers

Y

--

--

--

The command does not output logs.

The command processing continues.

9

stop-servers

Y

--

Y

--

The command does not output logs.

The command processing continues.

10

deploy

--

Y

--

--

The command does not output logs.

The consequences depend on the implementation.

11

undeploy

--

Y

Y

--

The command does not output logs.

The consequences depend on the implementation.

12

enable

--

Y

--

--

The command does not output logs.

The consequences depend on the implementation.

13

disable

--

--

Y

--

The command does not output logs.

The consequences depend on the implementation.

14

collect-snapshot

--

--

--

Y

The command does not output logs.

The command processing continues.

Legend:

Y: The subcommand processing time changes depending on the given conditions.

--: The subcommand processing time does not change.

Reference note

Subcommands that require a long processing time might time out, because the processing time of the commands might increase depending on given conditions, such as the number of applications to be deployed.