solidDB Help : Samples : HotStandby sample : Watchdog sample application : Failure situations and watchdog actions : Primary server fails
  
Primary server fails
Scenario
The primary server fails.
Symptoms
Applications cannot connect to the primary server. Also, the watchdog poll of the primary server fails and the HSB state of the secondary server is SECONDARY ALONE.
Remedy
When the primary server is down, switch the secondary server to be the new primary server and set the new primary server to the PRIMARY ALONE state. When fixed, the original primary server can become the secondary server.
The following table describes the steps that should be taken by the watchdog and the administrator in order to return the service to normal operation.
 
Description
Illustration
Server #1 fails.
Server #2 cannot access Server #1 and switches to SECONDARY ALONE state automatically.
The watchdog determines that Server #1 is not responding.
The diagram is described in the first column of the row
The watchdog instructs Server #2 to switch to PRIMARY ALONE state by using the command:
ADMIN COMMAND 'hotstandby set primary alone';
Applications access data from Server #2 (new primary server).
Server #2 saves all transactions in the transaction log.
The watchdog continues to monitor responsiveness of servers.
Note If the transaction log on Server #2 fills up before the network connection is fixed, you might have to switch Server #2 to STANDALONE state.
The diagram is described in the first column of the row
The administrator brings Server #1 back up as the secondary server.
The watchdog instructs Server #2 to connect to Server #1 by using the command:
ADMIN COMMAND 'hotstandby connect';
Server #1 reads and applies the transactions from the transaction log on Server #2.
Note If you switched Server #2 to STANDLONE state, you must copy the database from Server #2 to Server #1 before you reconnect the servers, see Synchronizing primary and secondary servers for details.
The diagram is described in the first column of the row
Go up to
Failure situations and watchdog actions