Azure performance problem - CMS_WebFarmServerTask

KVL KVL asked on December 6, 2015 06:43

I've deployed my Kentico site into Azure and it's running, but very poorly.

  1. The Application Pool resets frequently with a reason of CONFIG CHANGE.
  2. The database is under pretty heavy load even when the site has no traffic.

Regarding #1: If I remote into the web role's vm, I don't anything out of the ordinary. I have made a few changes to the application pool and the web app via a startup script (to enable applicationInitialization). I don't have much else to go on here.

Regarding #2: I have enabled database auditing and see that a single query is being executed hundreds of times per second.

EXECUTE sp_executesql, NVarChar(100) <noname>='SELECT TOP 1 COUNT(*) FROM CMS_WebFarmServerTask WHERE ServerId = @ServerId AND ErrorMessage IS NULL', NVarChar(13) <noname>='@ServerId int', Int @ServerId='1'

The site is not running in a web farm. I have one Azure CMSApp instance and under Settings -> Versioning and Synchronization -> Web farm, the Enable Web Farm setting is not checked. Under Web Farm application, I see the single web node. However, when I edit that node and click the "check server availability" button, it shows an error: The remote server returned an error: (503) Server Unavailable. at System.Net.HttpWebRequest.GetResponse() at CMSFormControls_System_UrlChecker.CheckServer(String parameters) in c:\Projects\ProceraHealth\CMS\CMSFormControls\System\UrlChecker.ascx.cs:line 325

Recent Answers


Brenden Kehren answered on December 7, 2015 14:28

What version of Kentico are you running? If you're running in a web farm environment, in v8 there was a fix posted for web farm servers not being removed and also leaving hundreds or thousands of orphaned sync tasks in the database. You might want to check this article out if you're running v8.

http://devnet.kentico.com/articles/automatic-deletion-of-inactive-wf-servers

If you're not running a web farm environment, then have you run the KInspector tool against it to see where you can make improvements? A few things to look for are:

  • not having caching enabled
  • not specifying ONLY the needed columns in listing objects web parts. (like repeaters)
  • running custom code and not utilizing caching
  • errors in custom code/macros
0 votesVote for this answer Mark as a Correct answer

KVL KVL answered on December 7, 2015 19:06

Thanks for your reply, Brenden.

I'm running version 8.0.19 with some customizations. This site used to run on a classic web host and has been migrated to Azure - so the database has some history, if that matters.

I've applied the fix and verified that it ran. The CMS_WebFarmServerTask table is still being queried constantly. I checked the table and it's empty. The idle load of these queries is generating about 40% utilization on the database. Again, that's with no traffic on the site whatsoever - it's run that query about 6.5 million times in the last day or so.

Any other ideas?

0 votesVote for this answer Mark as a Correct answer

Joshua Adams answered on December 8, 2015 18:05

There is a scheduled task that you can disable. The task name is: Synchronize web farm changes

That should stop that query from running.

0 votesVote for this answer Mark as a Correct answer

KVL KVL answered on December 9, 2015 04:06

Hi, Joshua.

Thanks for your comment.

I disabled that task and the query is still running. I've also reset execution counts and then rechecked after a little while to see if any of the tasks seemed to be running too much. But I don't see a correlation between the execution counts and the several millions of queries per day.

This is so frustrating...

0 votesVote for this answer Mark as a Correct answer

Mohammad Qamar answered on November 21, 2016 22:24

I had this same error, which is how I ran into your post. The solution (for me) was to make sure the address was using http vs https where appropriate.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.