Selenium_grid_logo_large

Self-Healing

Table Of Content:

Heartbeat Mechanism

To ease the maintenance of a Selenium Grid deployment:

Keep in mind that there is obviously a performance tradeoff in how often these heartbeat messages are sent:

Hub: Automatic Unregistering of Unresponsive Remote Controls

Remote Controls sometimes die, are killed or just hang. To better cope with these situations, Selenium Grid Hub checks the status of registered Remote Controls. It will automatically unregister:

remoteControlPollingIntervalInSeconds and sessionMaxIdleTimeInSeconds are configuration parameters that can be set in grid_configuration.yml. For instance:

hub:
   port: 4444
   remoteControlPollingIntervalInSeconds: 180
   sessionMaxIdleTimeInSeconds: 300
   environments:
       - name:    "Firefox on Windows"
         browser: "*firefox"

Remote Control: Automatic Re-registering to the Hub

Sometimes you might want to restart Selenium Grid Hub without restarting all the Remote Controls that were previously registered. Or the Hub might temporarily get disconnected from the remote controls. To better cope with these situations, the Remote Controls periodically poll the Hub (every hubPollerIntervalInSeconds seconds, default is 3 minutes).

If the Hub can be contacted but does not have any registered Remote Control matching the information sent by the Remote Control submitting the heartbeat request, the Remote Control will re-register itself to the Hub automatically.

You can specify hubPollerIntervalInSeconds when starting the Remote Controls. For instance:

ant -DhubPollerIntervalInSeconds=120 launch-hub