Bulk insert exception CMS_SearchTask

Matthew Butler asked on June 30, 2022 10:27

I've written a bulk insert of products and I'm now getting a Timeout exception when calling

_sKUInfoProvider.Set(skuResult.SKUInfo);

The timeout is on INSERT INTO CMS_SearchTask

any ideas?

It appears to be a deadlock on the table

Recent Answers


Matthew Butler answered on June 30, 2022 13:15

Looks like the Search Tasks are processed automatically as an async, which causes the deadlock.

I believe CMSProcessSearchTasksByScheduler=true should solve the issue, but wondered if there's a better solution?

0 votesVote for this answer Mark as a Correct answer

Matthew Butler answered on July 1, 2022 09:30

Judith Randolph I'm not using SQL bulk insert I'm just using a threaded process calling _sKUInfoProvider.Set(skuResult.SKUInfo);

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on July 9, 2022 17:04

I'd check your search tasks to see how many tasks are in that table. What's happening is the insert is triggering an indexing task to process that page and add it to the index. You might want to disable the search index during your import, then enable it after and trigger a rebuild of that index.

0 votesVote for this answer Mark as a Correct answer

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