<?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 Re: Serious issues with MyBatis connection management in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183125#M136255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Tijs, using the StrongUuidGenerator solved the deadlock problem for us.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't been able to determine conclusively if or when connections fail to be returned, I will run with a high poolMaximumCheckoutTime for a while and I'll report back if I find a problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The polling is unlikely to be an issue, it is true that the MyBatis pool uses notifyAll and thus attributes available connection to waiting clients at random, but it would be very unlucky for a waiting client to lose every time and never get his connection…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Franck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Mar 2015 08:22:52 GMT</pubDate>
    <dc:creator>franck102</dc:creator>
    <dc:date>2015-03-26T08:22:52Z</dc:date>
    <item>
      <title>Serious issues with MyBatis connection management</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183119#M136249</link>
      <description>I have been troubleshooting DB connection issues with Activiti 5.15.1 and after quite a bit of debugging I believe that I have identified at two significant problems. Problem #1: the default configuration of Activiti causes the job executor to keep all MyBatis connections checked out from the pool f</description>
      <pubDate>Thu, 19 Mar 2015 17:48:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183119#M136249</guid>
      <dc:creator>franck102</dc:creator>
      <dc:date>2015-03-19T17:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Serious issues with MyBatis connection management</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183120#M136250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thread dump attached.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also included (pool-active-conns.txt) the thread dump of the 10 active connections that are not being returned - the dump is taken at the time the connection is acquire from the pool.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 17:59:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183120#M136250</guid>
      <dc:creator>franck102</dc:creator>
      <dc:date>2015-03-19T17:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Serious issues with MyBatis connection management</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183121#M136251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So I just stumbled upon &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-789" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-789&lt;/A&gt;&lt;SPAN&gt; - basically that deadlock was reported in the past, and the recommended "fix" seems to be to use the StrongUuidGenerator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this still the recommended approach? Why isn't that generator the default configured generator if it solves what seems to be a critical defect?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Franck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 15:29:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183121#M136251</guid>
      <dc:creator>franck102</dc:creator>
      <dc:date>2015-03-23T15:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Serious issues with MyBatis connection management</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183122#M136252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, this is still the recommended approach. See &lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/index.html#advanced.uuid.generator" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#advanced.uuid.generator&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason why it is not a default, is because it is less performant. Secondly, not many people use the default connection pool, but their own preference (c3p0, Hikari), or jndi managed. None of our customers use it like that in production, but it is the easiest to get started and running out of the box, with a minimum number of dependencies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that many performance issues are already solved by switching the connection pooling framework. The UUID approach takes care of another (sometimes related) problem: that the load is simply to high for the connection pooling to be able to follow when needing a new batch of ids.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 13:09:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183122#M136252</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-03-24T13:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Serious issues with MyBatis connection management</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183123#M136253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had missed the StrongUuidGenerator being mentioned in the docs, thanks! Unfortunately:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Replacing the connection pool implementation will *not* make any difference with respect to connections not being returned to the pool. The pool only option in that situation are to forcibly claim back the connection, which will cause random errors if the connection is subsequently used. If that is confirmed to happen it has to be fixed in Activiti.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. The default implementation of the ID generator is subject to deadlock because it tries to acquire a connection after locking the object, while other threads do the exact opposite. It will only work if the connection pool always has at least a free idle connection - as soon as all connections are out and trying to generate IDs the deadlock will happen.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't see that a different connection pool implementation would make any difference on these two fronts, unless I am missing something? With any pool any DB or network hiccup that causes transactions to be held back for a few seconds will cause the pool to quickly run out of idle connections.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Franck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 13:48:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183123#M136253</guid>
      <dc:creator>franck102</dc:creator>
      <dc:date>2015-03-24T13:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Serious issues with MyBatis connection management</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183124#M136254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Franck,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Switching the connection pool sometimes help to optimise the number of connections and the idle time checks etc. I don't think the job executor keeps the connections checkout out of the pool. But it will poll the database every couple of seconds and execute outstanding jobs, so it might need a connection "all" the time. You can configure the number of threads that are used in the job executor and determine the correct level of connections needed in the connection pool based on that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 07:53:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183124#M136254</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2015-03-26T07:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Serious issues with MyBatis connection management</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183125#M136255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Tijs, using the StrongUuidGenerator solved the deadlock problem for us.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't been able to determine conclusively if or when connections fail to be returned, I will run with a high poolMaximumCheckoutTime for a while and I'll report back if I find a problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The polling is unlikely to be an issue, it is true that the MyBatis pool uses notifyAll and thus attributes available connection to waiting clients at random, but it would be very unlucky for a waiting client to lose every time and never get his connection…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Franck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 08:22:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/serious-issues-with-mybatis-connection-management/m-p/183125#M136255</guid>
      <dc:creator>franck102</dc:creator>
      <dc:date>2015-03-26T08:22:52Z</dc:date>
    </item>
  </channel>
</rss>

