CMS_WebFarmTask contains 30 million tasks with no link in CMS_WebFarmServerTask

Axelos Engineering asked on March 18, 2017 11:03

The largest table in our Kentico 8 db is CMS_WebFarmTask. On checking, there are around 30 million rows in that table which do not have a corresponding taskid in cms_webfarmservertask.

Reading the documentation, it seems that these are supposed to be deleted upon completion, but they don't seem to be.

  1. Is it safe for me to delete any tasks in cms_webfarmtask where there is no corresponding taskid in cms_webfarmservertask?
  2. Why is it not deleting them automatically once a task has been completed?
  3. What job does the deletion?

Correct Answer

vasu yerramsetti answered on March 20, 2017 12:29

  1. Yes, You can delete.
  2. May be issue with, New web farm id is generated dynamically while every deployment. Note: Please check, what is the currently running web farm name/ID? and How many web farms have running in your application.
  3. You can remove web farm related tasks from below tables in database.

CMS_WebFarmServer, CMS_WebFarmTask, CMS_WebFarmServerTask

  • What is your currently running kentico version?
  • What is the license type with servers count? Please confirm
  • What is the deployment environment (Windows Or Azure Or else)? Please confirm
0 votesVote for this answer Unmark Correct answer

Recent Answers


Trevor Fayas answered on March 18, 2017 16:20

Did you manually disable any scheduled tasks? Often they are in control of these things...

also what hotfix version are yo on, there are many bugs around the web farm, i don't see one specifically calling out that behavior but it's possible it may be fixed with a hotfix.

If you know they are properly run, probably safe to delete them.

0 votesVote for this answer Mark as a Correct answer

Axelos Engineering answered on March 21, 2017 12:25

Thanks both. I've deleted all of the activities that weren't active and cleared the table size down without issue.

I suspect it is something to do with the web farm ID as I know we had issues with the farm in the past. We're looking to upgrade to Kentico 10 in the near future, so that should resolve additional issues.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 24, 2017 15:24

There are issues with web farms in v8 so you will want to look into upgrading ASAP. Also check out this article which talks about a way to clean up the servers and tasks with a module.

0 votesVote for this answer Mark as a Correct answer

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