<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Deadlock detection</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Deadlock detection</description>
  <pubDate>Wed, 13 May 2026 09:56:40 -700</pubDate>
  <lastBuildDate>Fri, 27 Jan 2012 14:54:00 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3235</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Deadlock detection :     Hi Silvio,    We have...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3235&amp;PID=12563#12563</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1382" rel="nofollow">ritaf</a><br /><strong>Subject:</strong> 3235<br /><strong>Posted:</strong> 27-Jan-2012 at 2:54pm<br /><br /><font size="3" face="Times New Roman"></font><p style="margin: 0in 1.5pt 0.75pt; line-height: normal;" ="Ms&#111;normal"><span style='color: black; font-family: "Verdana","sans-serif"; font-size: 9pt; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ansi-: EN;' lang="EN">HiSilvio,<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></span></p><font size="3" face="Times New Roman"></font><p style="margin: 0in 1.5pt 0.75pt; line-height: normal;" ="Ms&#111;normal"><span style='color: black; font-family: "Verdana","sans-serif"; font-size: 9pt; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ansi-: EN;' lang="EN"><o:p>&nbsp;</o:p></span></p><font size="3" face="Times New Roman"></font><p style="margin: 0.75pt 1.5pt; line-height: normal;" ="Ms&#111;normal">&nbsp;</p><p style="margin: 0.75pt 1.5pt; line-height: normal;" ="Ms&#111;normal"><span style='color: black; font-family: "Verdana","sans-serif"; font-size: 9pt; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ansi-: EN;' lang="EN">Wehave done some optimization to prevent deadlocks.<span style="mso-spacerun: yes;">&nbsp; </span>But in case they still occur I want to add anability for the application to retry the save.<span style="mso-spacerun: yes;">&nbsp;</span>I can retry calling SaveChangesAsync from the client but I need to havea way to determine that the error was in fact a deadlock error.<span style="mso-spacerun: yes;">&nbsp; </span>Currently, on a client I can only get exceptionmessage, stack and etc. (RemoteException properties of EntityManagerException)and generic FailureType.<span style="mso-spacerun: yes;">&nbsp; </span>I need to find somethingin the EntityManagerSaveException that will tell me the error number.<o:p></o:p></span></p><font size="3" face="Times New Roman"></font><p style="margin: 0in 0in 10pt;" ="Ms&#111;normal"><o:p><font size="3" face="Calibri">&nbsp;</font></o:p></p><p style="margin: 0in 0in 10pt;" ="Ms&#111;normal"><font size="3" face="Calibri">In case of a deadlock, EntityServerSaveInterceptor.OnErrorinner exception is System.Data.SqlClient.SqlException, error number 1205.</font></p><font size="3" face="Times New Roman"></font><p style="margin: 0in 0in 10pt;" ="Ms&#111;normal"><o:p><font size="3" face="Calibri">&nbsp;</font></o:p></p><font size="3" face="Times New Roman"></font><p style="margin: 0in 0in 10pt;" ="Ms&#111;normal"><font size="3" face="Calibri">Thank you,</font></p><font size="3" face="Times New Roman"></font><p style="margin: 0in 0in 10pt;" ="Ms&#111;normal"><font size="3" face="Calibri">Rita</font></p><font size="3" face="Times New Roman"></font>]]>
   </description>
   <pubDate>Fri, 27 Jan 2012 14:54:00 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3235&amp;PID=12563#12563</guid>
  </item> 
  <item>
   <title>Deadlock detection :   Hi Rita,In what circunstances...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3235&amp;PID=12562#12562</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3235<br /><strong>Posted:</strong> 27-Jan-2012 at 1:55pm<br /><br />Hi Rita,<div>&nbsp;</div><div>In what circunstances do you anticipate these deadlocks? (on concurrency conflicts?)</div><div>Have you considered using optimistic concurrency? (more detais in the <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/save-c&#111;ncurrency" target="_blank">DevForce Resource Center</a>)</div><div>&nbsp;</div><div>Unfortunatelly, you won't be able to retry the save on the server once you get an error.</div><div>&nbsp;</div><div>What particular type of inner exception are you getting on <em>EntityServerSaveInterceptor.OnError</em>? I tried to simulate a deadlock and ended up getting timeout errors due to non response from SQL Server. </div><div>&nbsp;</div><div>&nbsp;</div><div>Silvio.</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Fri, 27 Jan 2012 13:55:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3235&amp;PID=12562#12562</guid>
  </item> 
  <item>
   <title>Deadlock detection : Hi,I am a novice DevForce developer,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3235&amp;PID=12549#12549</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1382" rel="nofollow">ritaf</a><br /><strong>Subject:</strong> 3235<br /><strong>Posted:</strong> 26-Jan-2012 at 10:00am<br /><br /><p ="ms&#111;normal"="" style="text-align: left; : rgb251, 251, 253; margin-top: 0in; margin-right: 1.5pt; margin-bottom: 0.75pt; margin-left: 1.5pt; line-height: normal; "><span lang="EN" style="font-size: 9pt; font-family: Verdana, sans-serif; ">Hi,<o:p></o:p></span></p><p ="ms&#111;normal"="" style="text-align: left; : rgb251, 251, 253; margin-top: 0.75pt; margin-right: 1.5pt; margin-bottom: 0.75pt; margin-left: 1.5pt; line-height: normal; "><span lang="EN" style="font-size: 9pt; font-family: Verdana, sans-serif; ">I am a novice DevForce developer, so my question is probably very trivial.<o:p></o:p></span></p><p ="ms&#111;normal"="" style="text-align: left; : rgb251, 251, 253; "><span lang="EN" style="font-size: 9pt; line-height: 13px; font-family: Verdana, sans-serif; ">Is there a way to detect deadlock errors (or to distinguish any other data provider errors) when EntityManager.SaveChanges/SaveChangesAsync fails? I want to retry saving changes if they fail due to the database deadlock.&nbsp; When deadlock occurs I can see a particular type of exception on a server side in EntityServerSaveInspector.OnError as an InnerException but I am not sure if I can retry at this point.&nbsp; On a client side, error is returned as a generic EntityManagerServerException and InnerException is not set.&nbsp; I can see RemoteExceptionDetails but I cannot see the original error number, so I cannot make a determination that it’s a deadlock error.<o:p></o:p></span></p><p ="ms&#111;normal"="" style="text-align: left; : rgb251, 251, 253; "><span lang="EN" style="font-size: 9pt; line-height: 13px; font-family: Verdana, sans-serif; ">Thank you,<o:p></o:p></span></p><p ="ms&#111;normal"="" style="text-align: left; : rgb251, 251, 253; "><span lang="EN" style="font-size: 9pt; line-height: 13px; font-family: Verdana, sans-serif; ">Rita</span></p>]]>
   </description>
   <pubDate>Thu, 26 Jan 2012 10:00:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3235&amp;PID=12549#12549</guid>
  </item> 
 </channel>
</rss>