The failover design of the messaging engine
relies upon
the database connections that are broken when a messaging engine instance
fails. In order for failover to occur in high availability environments,
ensure that the system notices the broken connection in a timely manner
and releases database locks. This task is done by configuring the
TCP KeepAlive settings.
Before you begin
You must have DB2® database installed and configured on
your system. Run the following commands on the computer that has your DB2 database server.
Procedure
For Windows operating system, perform the following steps:
- Log in as a system administrator.
- Select the following path in the left pane:
My
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
- Right click in the right pane and select
- Enter the name as KeepAliveInterval for the new
parameter.
- Right click this new parameter and select Modify.
- Select Base as Decimal and enter the value as
30000 (30000 milliseconds = 30 seconds).
- Similarly, add another DWORD value with name KeepAliveTime and set
the value equal to 30000.
- Restart the computer for changes to take effect.
For Linux operating system, perform the following steps:
- Log in as a system administrator.
- Edit the sysctl.conf file:
# vi /etc/sysctl.conf
- Add the following parameter values:
net.ipv4.tcp_keepalive_time = 600
net.ipv4.tcp_keepalive_intvl = 60
net.ipv4.tcp_keepalive_probes = 20
- Run the following commands to save your changes:
echo "net.ipv4.tcp_keepalive_time = 600" | sudo tee -a /etc/sysctl.conf
echo "net.ipv4.tcp_keepalive_intvl = 60" | sudo tee -a /etc/sysctl.conf
echo "net.ipv4.tcp_keepalive_probes = 20" | sudo tee -a /etc/sysctl.conf
- Restart your computer for changes to take effect.
shutdown -r now
- After the computer restarts, you can use the following command to view all the kernel
parameters:
sysctl -a