Local Smart Search Tasks Filling up

Matthew Butler asked on October 30, 2023 18:19

We've just had an out of memory exception below System.OutOfMemoryException in CMS.DataEngine.BulkUpdateHandler.StartEvent for CMS.WebFarmSync.WebFarmTaskProcessor.Process.

On review I noticed there are 1000's of tasks queued in the Smart search local task (which we don't use), the odd thing is it looks like it started on 9th Sept 2023 at 5am? There was no deployment and to my knowledge no settings changed.

Why would this start and how do we stop it

Correct Answer

Brenden Kehren answered on October 30, 2023 19:06

Matt,

The best thing to do is clear that database table out manually. There are 2 scheduled tasks that need to be running even if you're not using search on your site:

  • Execute Azure search tasks
  • Execute local search tasks

This is due to the local system using search internally. If those scheduled tasks are not running, then when they try to run, they will most likely error out due to so many of them waiting to be executed. So as I stated earlier, manually delete those tasks in the following tables, then make sure those two scheduled tasks are executing at least daily.

  • CMS_SearchTask
  • CMS_SearchTaskAzure
0 votesVote for this answer Unmark Correct answer

Recent Answers


Juraj Ondrus answered on October 31, 2023 05:28

What is the exact version - hotfix? There were several bugs fixed and e.g. the media library usage index could generate the tasks. Have you disabled the media files usage indexing as well?

0 votesVote for this answer Mark as a Correct answer

Matthew Butler answered on October 31, 2023 09:43

Its version v13.0.85, we had disabled the media index etc.. and stopped the Execute local search tasks, and this had been working fine all year until 5am on 9th Sept 2023, I believe on looking into it, it was when our Azure Web App Machine name changed, and I believe at the time the webservers doubled up we has

AB0mdwk000036 AB0mdwk000036_AutoExternalWeb FF0mdwk0004Y4 FF0mdwk0004Y4_AutoExternalWeb

This caused extra tasks I believe, but I cleared the tasks and removed the old servers. So no we have

FF0mdwk0004Y4 FF0mdwk0004Y4_AutoExternalWeb

And the tasks building up are for FF0mdwk0004Y4 and it primarily seem to be user objects for login, but there are ecommerce.sku and cms.document tasks

0 votesVote for this answer Mark as a Correct answer

Matthew Butler answered on October 31, 2023 09:45

I can re-enable the task if that will keep it clear, but I'd rather go back to how it was before.

Also any idea what would have triggered the WebFarmTaskProcessor WebFarmSync

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on October 31, 2023 11:44 (last edited on October 31, 2023 11:45)

I would recommend applying the latest hotfix - if you check the fixed bugs, there were at least two bugs fixed in later hotfix which caused redundant/unwanted search tasks to be logged. Otherwise, could you please provide steps how to reproduce the issue at will using out of the box Kentico installation?

0 votesVote for this answer Mark as a Correct answer

Matthew Butler answered on November 10, 2023 09:48

We've enabled the search task to clear the backlog for now. We will look at installing the latest hotfix. But looking at the notes it looks like its primarily the media task that have been sorted. Its other tasks that are filling the list.

0 votesVote for this answer Mark as a Correct answer

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