<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Activiti 6 Deadlock on delete and select ACT_RU_JOB on MSSQL Server in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/activiti-6-deadlock-on-delete-and-select-act-ru-job-on-mssql/m-p/23191#M10127</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;we recently upgraded from activiti 5.2.x to activiti 6 and now we have deadlock issue on out database.&lt;/P&gt;&lt;P&gt;The sql statement which is the source of deadlock is as follows:&lt;/P&gt;&lt;P&gt;(@P0 nvarchar(4000),@P1 int)delete from ACT_RU_TIMER_JOB where ID_ = @P0 and REV_ = @P1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have tried to add non-clustured index on&amp;nbsp;&lt;SPAN&gt;ID_&amp;nbsp; AND&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;REV_&amp;nbsp;however the lock still exists.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the above is the source of issue which cause lock on the followings:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(@P0 nvarchar(4000))select * from ACT_RU_JOB where ID_ = @P0&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(@P0 datetime2,@P1 int,@P2 int)SELECT SUB.* FROM (&lt;BR /&gt; select&lt;BR /&gt; RES.* , row_number() over (ORDER BY RES.ID_ asc) rnk FROM ( select distinct RES.* &lt;BR /&gt; from ACT_RU_JOB RES&lt;BR /&gt; where RES.LOCK_EXP_TIME_ is not null and RES.LOCK_EXP_TIME_ &amp;lt; @P0&lt;BR /&gt; )RES ) SUB WHERE SUB.rnk &amp;gt;= @P1 AND SUB.rnk &amp;lt; @P2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(@P0 int,@P1 int)SELECT SUB.* FROM (&lt;BR /&gt; select&lt;BR /&gt; RES.* , row_number() over (ORDER BY RES.ID_ asc) rnk FROM ( select distinct RES.* &lt;BR /&gt; from ACT_RU_JOB RES&lt;BR /&gt; where LOCK_EXP_TIME_ is null&lt;BR /&gt; )RES ) SUB WHERE SUB.rnk &amp;gt;= @P0 AND SUB.rnk &amp;lt; @P1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please let me know what further information you require and will provide you&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Nikan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Sep 2017 13:15:43 GMT</pubDate>
    <dc:creator>nikan_negaresh</dc:creator>
    <dc:date>2017-09-25T13:15:43Z</dc:date>
    <item>
      <title>Activiti 6 Deadlock on delete and select ACT_RU_JOB on MSSQL Server</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/activiti-6-deadlock-on-delete-and-select-act-ru-job-on-mssql/m-p/23191#M10127</link>
      <description>Hi&amp;nbsp;we recently upgraded from activiti 5.2.x to activiti 6 and now we have deadlock issue on out database.The sql statement which is the source of deadlock is as follows&lt;IMG id="smileysad" class="emoticon emoticon-smileysad" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;@P0 nvarchar(4000),@P1 int)delete from ACT_RU_TIMER_JOB where ID_ = @P0 and REV_ = @P1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;We have tried to add non-clustured in</description>
      <pubDate>Mon, 25 Sep 2017 13:15:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/activiti-6-deadlock-on-delete-and-select-act-ru-job-on-mssql/m-p/23191#M10127</guid>
      <dc:creator>nikan_negaresh</dc:creator>
      <dc:date>2017-09-25T13:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti 6 Deadlock on delete and select ACT_RU_JOB on MSSQL Server</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/activiti-6-deadlock-on-delete-and-select-act-ru-job-on-mssql/m-p/23192#M10128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;This issue is fixed by switching on READ_COMMITTED_SNAPSHOT on MSSQL server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 08:54:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/activiti-6-deadlock-on-delete-and-select-act-ru-job-on-mssql/m-p/23192#M10128</guid>
      <dc:creator>nikan_negaresh</dc:creator>
      <dc:date>2017-09-28T08:54:45Z</dc:date>
    </item>
  </channel>
</rss>

