The Most Common Issues in Web Farm Environments


When running your site on multiple web servers with a load balancer, you may run into some issues with synchronization between servers in Kentico. This article summarizes the most common problems you might encounter when utilizing web farms. Of course, each case contains a possible solution, which usually helps, and some of them also have tips on how you can avoid them in the future.

Below, you can find a list of such issues with a brief description:

  • General misconfiguration
    • Usually caused by an invalid server name in the web.config file, web farm servers connected to different databases, or discrepancies between settings in Kentico Administration Interface settings and web.config settings (note: web.config settings take precedence over admin settings)
  • License keys
    • You need to have a license key for all sites running for a sufficient number of web farm servers
    • This number matches the number of web servers you are running your site on
    • Otherwise, web farm synchronization would obviously not work and you would be getting all kinds of licensing errors in the event log
  • Health statuses
    • The statuses help you find out whether the web farm servers are active or not
    •  Three possible statuses:
      • Healthy—server is active and ready to process the web farm tasks for it without any significant delays
      • Transitioning—server is initializing or it has stopped responding
      • Not responding—server is not responding at all and is probably down
  • Session state (sticky vs. non-sticky sessions, depending on load balancer settings)
    • Sticky sessions
      • all session state modes are supported
    • Non-sticky sessions
      • InProc mode not supported
      • StateServer, SQLServer, and Custom modes supported
  • Multiple environments connected to the same database
    • More environments with the same project code base connected to the same database
    • Easier to notice in automatic mode => more web farm servers registered than necessary
    • Symptom in manual mode—web farm tasks are processed correctly, changes do not seem to be propagated sometimes 
  • Web farms + Content staging
    • Web farm environment—all servers connected to a single database vs. Content staging—each staging server connected to a separate database
    • Possible scenario—source and target servers configured in web farms individually with separate source and target databases
  • Event log errors
    • [DataConnection.HandleError]: Query: Proc_CMS_WebFarmSync_SetServerTasks Caused exception: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_CMS_WebFarmServerTask_ServerID_CMS_WebFarmServer“ -> restart all web farm servers
    • License webfarm server count exceeded. -> license key for insufficient number of servers (also occurs in Web farm -> Tasks)
    • Error regarding one of the web farm related stored procedures -> most probably versions of project code base and database not matching each other
  • Incorrect number of web farm servers in automatic mode
    • two possible scenarios—more servers/fewer servers than expected
    • Solution—restart all web farm servers through the System application or restart application pools in IIS on all servers
  • Macros not working
    • Salt needs to be the same on all web farm servers—<CMSHashStringSalt> web.config key
    • Another solution could be re-signing all macros


Should you want to learn more about this topic, please read the documentation for some more tips—Troubleshooting web farms.

Share this article on   LinkedIn

Filip Ligač

Hi, I work as a Cloud Support Specialist here at Kentico. I write about Microsoft Azure and and am trying to extend knowledge about the best practices for deployment.