Timeout behavior of the AIX application server
Various types of timeout related to the AIX application server are discussed in this topic.
On AIX, you can display and change your current network attribute values using the no command.
To avoid negative effects on system performance, it is recommended that you change default values only after careful study.
For more information on how the network attributes interact with each other, refer to AIX Version 7.1, Network management.
Client connection timeout
When the client connects to the server, each connection attempt times out after a time period determined by the value of the tcp_keepinit network attribute. When this happens, the connect attempt has failed. The client then writes an error message and returns the error to the calling process.
The default value for tcp_keepinit is 75 seconds. This means that an AIX connection request times out after 75 seconds.
For an example of where you might need to change this default see Additional considerations. This setting is system-wide and affects all TCP connections that are established from the machine.
Related information:
- As you can read in Db2 connection failover for ABAP instances, the new SAP approach for implementing Db2 connection failover for ABAP instances is based on the native CLI driver failover capabilities.
- For the relationship between the setting of the TCP/IP client connection timeout and the Db2 connection timeout, see Timeout behavior of Db2 client connections.
Client transmission timeout
Each time the client sends data to the database server, TCP/IP waits for acknowledgment of this data. TCP/IP retransmits data if acknowledgments are missing. The time period that TCP/IP waits for the acknowledgment before it times out is variable and dynamically calculated. This calculation uses, among other factors, the measured roundtrip time on the connection. The timeout interval is doubled with each successive retransmission. When the final transmission timeout occurs, the client's next receive call fails with a send timeout error. The client writes an error message and returns the error to the calling process.
On AIX, the number of retransmissions is determined by the value of the rto_length network attribute.
- rto_length, default is 13
- rto_limit, default is 7
- rto_low, default is 1
- rto_high, default is 64
The following example shows how the AIX algorithm works:
rto_length=13
retransmission intervals. The first retransmission
starts earliest after rto_low=1
second. The time between retransmissions is doubled
each time (called exponential backoff). There are two parameters limiting the retransmission
interval: rto_limit=7
, which is the maximum number of such doublings andrto_high=64
seconds, which is the maximum interval between retransmissions.
Transmission | Retransmission after (seconds) |
---|---|
1 | 1.5 |
2 | 3 |
3 | 6 |
4 | 12 |
5 | 24 |
6 | 48 |
7 | 64 |
8 | 64 |
9 | 64 |
10 | 64 |
11 | 64 |
12 | 64 |
13 | (Reset) |
After the 13th transmission attempt, TCP/IP gives up resending and sends a reset request.
Recommended values: For the client transmission timeout, it is recommended that you change the value of rto_length to 8. This reduces the timeout to approximately 4 minutes.
Client idle timeout
If there is no data flow on a client/server connection, TCP/IP uses a so-called keep-alive mechanism to verify that such an idle connection is still intact after a predefined period of time. The term idle means with respect to TCP/IP and includes the case where the client is waiting in the recv() function because this waiting for data is a passive task and does not initiate any packet transfers for itself. If the remote system is still reachable and functioning, it acknowledges the keep-alive transmission.
On AIX, this mechanism is controlled by the network attributes tcp_keepidle and tcp_keepintvl.
The default values of these network attributes determine that an idle connection is closed after 2 hours, 12 minutes, and 30 seconds if no keep-alive probes are acknowledged.
Recommended values: It is recommended that these network attributes be set as follows:
- tcp_keepidle to 600 half-seconds (5 minutes) and
- tcp_keepintvl to 12 half-seconds (6 seconds).
This results in approximately 5 minutes + (10 * 6) seconds = 6 minutes.