To detect a deadlock I'using this code :

  // do some operation that might deadlock
catch (Exception ex)
  if (ex is StorageException && ex.InnerException != null && ex.InnerException is System.Data.SqlClient.SqlException)
    if (((System.Data.SqlClient.SqlException)ex.InnerException).ErrorCode == -2146232060) // deadlock
       // log deadlock
  // handle other exceptions

This is not very practical and I'm not sure it will work with another database (currently using sql server).

I've seen a ticket for this ( ... tail?id=29) Do you plan to implement this feature?

It would be useful for us.


This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked Jan 13 '10 at 09:56

olorin's gravatar image


edited Sep 08 '10 at 06:14

Alex%20Yakunin's gravatar image

Alex Yakunin

Yes, this must be done ASAP.

(Jan 13 '10 at 09:56) Alex Yakunin Alex%20Yakunin's gravatar image

One Answer:

Fixed a long time ago.

answered Sep 07 '10 at 04:11

olorin's gravatar image


not in all cases:

(Sep 09 '10 at 07:35) pil0t pil0t's gravatar image

True - to be fixed. I assigned both issues to the nearest release.

(Sep 09 '10 at 09:51) Alex Yakunin Alex%20Yakunin's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview


Once you sign in you will be able to subscribe for any updates here



Asked: Jan 13 '10 at 09:56

Seen: 7,558 times

Last updated: Sep 09 '10 at 09:51

powered by OSQA