solidDB Help : Configuring and administering : Configuring and administering HotStandby : Configuring HotStandby : Setting HotStandby server wait time to help detect broken or unavailable connections
  
Setting HotStandby server wait time to help detect broken or unavailable connections
A HotStandby (HSB) server uses timeout parameters to control how long it waits before it concludes that an existing connection is broken or a new connection cannot be established.
The timeout parameters are:
HotStandby.PingInterval: specifies the interval between the "ping" messages the server sends to indicate that it is working correctly
HotStandby.PingTimeout: specifies the amount of time that the server must wait before it changes to the PRIMARY UNCERTAIN state
HotStandby.ConnectTimeout: specifies the amount of time that the server must wait when it tries to establish a new connection to the other server (for example, in an ADMIN COMMAND 'hotstandby connect' operation)
If an HSB server that is in the PRIMARY ACTIVE or SECONDARY ACTIVE state tries to contact the other server and receives no reply within a specified amount of time, it changes to PRIMARY UNCERTAIN, PRIMARY ALONE, or SECONDARY ALONE.
PingTimeout and PingInterval parameters [HotStandby]
A ping operation is essentially an "I am alive" message that is sent by one database server to another. The ping system in the HotStandby setup is a passive heartbeat system. When enabled, both the primary and secondary servers send ping messages to each other at regular intervals. For more information, see Heartbeat.
For example, if the HotStandby.PingInterval parameter is set to 10 seconds, then the servers send ping messages to each other after every 10 seconds. If server (S1) does not hear from the other (S2) within 10 seconds, then S1 concludes that S2 is down or inaccessible. Server S1 then switches to another state, for example, from PRIMARY ACTIVE to PRIMARY UNCERTAIN.
If the values of the parameters are different, the values set in the primary server during execution of the hsb connect command take precedence. The values do not change during switchovers. However, they can be changed dynamically with the ADMIN COMMAND 'parameter' command.
If HotStandby.PingTimeout is set to zero, pinging is disabled.
Ping requires little overhead and a solidDB server is set up to respond quickly to missing ping messages. You can set the HotStandby.PingInterval value to a fairly short interval, such as a second, or even less.
However, if your network has a lot of traffic and there are delays in receiving ping messages, you might need to set the HotStandby.PingTimeout value to a larger value to avoid false alarms.
Note Some networking software also has a ping operation, but the HotStandby.PingTimeout and HotStandby.PingInterval parameters apply only to the solidDB server pings, not general network pings.
ConnectTimeout parameter [HotStandby]
In some network implementations, a connect operation might not respond for an indefinite period of time. One possible reason is that the remote server is a known server but unavailable during the connect attempt. By specifying a connect timeout value, you can set the maximum time in seconds that a HotStandby connect operation waits for a connection to a remote server.
You set the connect timeout value with the HotStandby.ConnectTimeout parameter, for example:
[HotStandby]
; Set ConnectTimeout to 20 seconds (20000 milliseconds). ConnectTimeout=20000
The following ADMIN COMMAND commands use the timeout that is configured by using the HotStandby.ConnectTimeout parameter:
hotstandby connect
hotstandby switch primary
hotstandby switch secondary
Go up to
Configuring HotStandby