---
title: Troubleshooting web farms
related:
  - https://docs.kentico.com/k82/configuring-kentico/optimizing-website-performance/setting-up-web-farms/configuring-web-farm-servers.md
  - https://docs.kentico.com/k82/configuring-kentico/optimizing-website-performance/setting-up-web-farms/debugging-web-farms.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

## 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](https://docs.kentico.com/k82/configuring-kentico/optimizing-website-performance/setting-up-web-farms/debugging-web-farms.md)

### 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.

  - Enable a [synchronization mechanism](https://docs.kentico.com/k82/configuring-kentico/optimizing-website-performance/setting-up-web-farms/web-farm-synchronization-mechanisms.md).
- 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](https://docs.kentico.com/k82/configuring-kentico/optimizing-website-performance/setting-up-web-farms/debugging-web-farms.md) 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](https://docs.kentico.com/docsassets/k82/troubleshooting-web-farms/webfarm_licensing.png "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.
