Database error - Sync Error

Sumit Kumar asked on January 17, 2022 18:04

For a specific page, I received syncing error and event logs show database error:

Query: INSERT INTO Staging_Task ([TaskSiteID], [TaskDocumentID], [TaskNodeAliasPath], [TaskTitle], [TaskData], [TaskTime], [TaskType], [TaskObjectType], [TaskObjectID], [TaskRunning], [TaskNodeID], [TaskServers]) VALUES (@TaskSiteID, @TaskDocumentID, @TaskNodeAliasPath, @TaskTitle, @TaskData, @TaskTime, @TaskType, @TaskObjectType, @TaskObjectID, @TaskRunning, @TaskNodeID, @TaskServers);

SELECT SCOPE_IDENTITY() AS [ID]

Caused exception: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated.

Could you please help to know what can be cause of this database error.

Recent Answers


Juraj Ondrus answered on January 18, 2022 08:16

When you check the DB, how many records are in the Staging_Task table? What about other Staging_* tables? I would check that there are no orphaned records - I mean, in the Staging_Task table all records are pointing to an existing TaskServers.
Then, since it is a time out error, check what is the load on the SQL server - is it able to handle the load? Maybe there is something else consuming the resources.

0 votesVote for this answer Mark as a Correct answer

Eugene Paden answered on February 16, 2022 21:35 (last edited on February 16, 2022 21:35)

We've encountered this when there are so many records in the staging_* tables, especially those referencing servers that have been taken offline already. Basically what's happening is that the insert is taking too long as it not only needs to add the record but also update the indexes. It may also be happening while so many other tasks are running and your DB utilization is high or there are many long running queries resulting in poor DB performance.

0 votesVote for this answer Mark as a Correct answer

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