Troubleshooting web farms

Monitoring web farm synchronization tasks

You can monitor the web farm tasks in the Web farm application on the Tasks tab. The tab shows all synchronization tasks that are currently active (waiting to be processed).

In an ideal situation, this tab should not contain any tasks – this means that the web farm tasks are processed soon after they are created. The system automatically removes successfully processed tasks.

The Anonymous tasks tab displays a list of currently active (waiting to be processed) anonymous synchronization tasks. These tasks are logged by external applications (e.g. Windows services) to ensure that changes made by the external application are reflected in the web application cache. Tasks are logged as anonymous only if the application is NOT configured to run in a web farm. If it is configured to run in a web farm, these tasks are logged as standard synchronization tasks on the Tasks tab.

See also: Debugging web farms

Web farm tasks are not being processed

If the Tasks tab contains web farm tasks that fail to be processed, the cause can be one of the following:

  • No synchronization mechanism is enabled.

  • The system is configured for more web farm servers than there really are.

    • Check the Web farm application -> Servers tab and make sure that the number of configured web farm servers corresponds to reality. Delete excess servers or restart your application on servers that are missing from the list.
  • In case of the URL updater mechanism, the Server root URL settings are not configured properly.

    • Check the Server root URL setting in Web farm -> Servers -> edit a server for each web farm server.
  • In case of the database updater mechanism, the thread is not running.

    • Check if the CMS.WebFarmSync.DbWebFarmUpdater thread is running in Debug -> Worker threads. See Debugging web farms for more information.

Servers contain licenses for domains with a different number of allowed web farm servers

When you enable web farm functionality on a Kentico instance, we recommend that you use only those website domains, for which you have licenses with the same number of web farm servers allowed. If you have a website which can be run on multiple servers, adding another website with fewer allowed web farm servers can cause “License web farm server count exceeded.” errors.

Website licensing when using web farms

Solution

These are the possible solutions for this problem:

  • Obtain additional licenses for your websites so that they can be run on the same number of web farm servers.
  • Use completely separate infrastructures (different servers and databases) for each website.

Incorrect web farm servers registered in the system

Error: [DataConnection.HandleError]: Query: Proc_CMS_WebFarmSync_SetServerTasks Caused exception: The INSERT statement conflicted with the FOREIGN KEY constraint “FK_CMS_WebFarmServerTask_ServerID_CMS_WebFarmServer”.

This error occurs if automatic web farm server generation is enabled and some servers become outdated or new servers are missing in the system.

Solution

Restart the web farm servers in System -> General -> Restart all web farm servers. The restart re-registers the servers correctly.