Transaction (Process ID 137) was deadlocked on lock resources with another process and has been chos

Jahan Zeb asked on September 6, 2020 10:31

Dear,

Please guide me on this deadlock exception, I am getting this for CMS_SettingsKey table.

Message: 
DataConnection.HandleError]:

Query:
SELECT *
FROM CMS_SettingsKey
WHERE [SiteID] = @SiteID AND [KeyName] = @KeyName

Caused exception:
Transaction (Process ID 137) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

I am using this to get VisitorCount.

Thank you,

Jahan

Recent Answers


Dmitry Bastron answered on September 7, 2020 10:09

Hi Jahan,

It is difficult to say what causes the deadlock without seeing the code. Could you post the code accessing the settings? Do you use transactions in the code? Also, not sure I understood what is the VisitorCount you are referring to?

0 votesVote for this answer Mark as a Correct answer

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