<?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 A dead lock occurred on ACT_HI_ACTINST  in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226777#M179907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are currently facing deadlock on ACT_HI_ACTINST on full asynchronous/exclusive node processes&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable Job 1169985 failed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;org.apache.ibatis.exceptions.PersistenceException: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### Error querying database.&amp;nbsp; Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 270) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To summarize on what happened:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. 2 jobs of notification are inserted in ACT_RU_JOB. The jobs are created and the transactions are commited .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. The job concerning PID=1168762 (exec=1181856) is executed firstly and the subwokflow is terminated so the engine is updating ACT_HI_ACTINST to set an endtime "2016-08-25 15:36:15"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;update ACT_HI_ACTINST set&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXECUTION_ID_ = @P0,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ASSIGNEE_ = @P1,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END_TIME_ = @P2,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DURATION_ = @P3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where ID_ = @P4',4112,8193,@p7 output,N'1181856',NULL,'2016-08-25 15:36:15.0620000',50805,N'1181857'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;select @p1, @p2, @p7&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. The job concerning PID=1181910 (exec=1181952) is executed and tries to query ACT_HI_ACTINST with a simple select (after 15:35:44 date of creation of the event)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;select RES.* , row_number() over (ORDER BY RES.ID_ asc) rnk FROM ( select distinct RES.* &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from ACT_HI_ACTINST RES&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE&amp;nbsp; RES.EXECUTION_ID_ = @P0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and RES.ACT_ID_ = @P1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and RES.END_TIME_ is null &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )RES ) SUB WHERE SUB.rnk &amp;gt;= @P2 AND SUB.rnk &amp;lt; @P3',4112,8193,@p7 output,N'1181952',N'messageintermediatecatchevent4',1,2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. A deadlock is detected between the select and the update and the exec=1181952 is killed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5. the event notification job=1169985 is in error and the workflow is stuck on the node&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Aug 2016 15:51:39 GMT</pubDate>
    <dc:creator>william_thierry</dc:creator>
    <dc:date>2016-08-29T15:51:39Z</dc:date>
    <item>
      <title>A dead lock occurred on ACT_HI_ACTINST</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226777#M179907</link>
      <description>Hello,We are currently facing deadlock on ACT_HI_ACTINST on full asynchronous/exclusive node processesorg.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable Job 1169985 failedorg.apache.ibatis.exceptions.PersistenceException: ### Error querying database.&amp;nbsp; Cause: com.microsoft.sqlserver.jdbc.SQL</description>
      <pubDate>Mon, 29 Aug 2016 15:51:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226777#M179907</guid>
      <dc:creator>william_thierry</dc:creator>
      <dc:date>2016-08-29T15:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: A dead lock occurred on ACT_HI_ACTINST</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226778#M179908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;we are using actviti 5.20 &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2016 15:52:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226778#M179908</guid>
      <dc:creator>william_thierry</dc:creator>
      <dc:date>2016-08-29T15:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: A dead lock occurred on ACT_HI_ACTINST</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226779#M179909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;deadlocks can occur under very high loads, but very infrequent. What kind of load are we talking about.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also worth mentioning: in the latest v6 beta3 we've been exactly working on the job executor to be way more performant than before. We also saw deadlocks under very high load. We've been able to improve on that greatly. Especially the new message based executor is much faster and can handle these things better than the one in 5.20 version.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 14:21:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226779#M179909</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-09-01T14:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: A dead lock occurred on ACT_HI_ACTINST</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226780#M179910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In order to have our REST API to being called twice which would cause unexpected behavior.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We Override Activiti DefaultFailedJobCommandFactory to modify Job retries policy to turn off every retries.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are currently thinking about on SQL exceptions&amp;nbsp; ( ibatis PersistenceException )&amp;nbsp; letting activiti engine handle the retry with JobRetryCmd , the other working solution is to change the activiti database isolation level to READ_COMMITTED_SNAPSHOT ( we are using SQL Server ).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But we are worried about unexpected behavior on activiti part if we change the isolation level.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And yes we are facing deadlocks only on heavy load.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 16:12:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226780#M179910</guid>
      <dc:creator>william_thierry</dc:creator>
      <dc:date>2016-09-01T16:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: A dead lock occurred on ACT_HI_ACTINST</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226781#M179911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&amp;gt; But we are worried about unexpected behavior on activiti part if we change the isolation level.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yeah, I would too. Activiti expects. READ_COMMITTED., so that's good. However, with SQL server I seem to recall not everything is 100% the same wrt isolation levels compared to other databases.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2016 13:25:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226781#M179911</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-09-02T13:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: A dead lock occurred on ACT_HI_ACTINST</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226782#M179912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your answer, sorry i was away last week. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I understood correctly we should stay on READ_COMMITTED and not READ_COMMITTED_SNAPSHOT ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So our only option would be to let activi retry SQL Exceptions ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards, &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 06:32:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/a-dead-lock-occurred-on-act-hi-actinst/m-p/226782#M179912</guid>
      <dc:creator>william_thierry</dc:creator>
      <dc:date>2016-09-12T06:32:41Z</dc:date>
    </item>
  </channel>
</rss>

