<?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: LDAP connection leaks for activiti-rest-webapp in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/ldap-connection-leaks-for-activiti-rest-webapp/m-p/210471#M163601</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When I set the connection pooling properties when starting the JVM (rather than or at least in addition to the bean config above), I see the connection count ramp up, then drop every few minutes.&amp;nbsp; So it looks like I am not setting those properties in the bean config properly… or they don't belong there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an aside, I also upgraded to JDK 8 when upgrading to 5.17.0 (that was not a great idea, should have changed one thing at a time).&amp;nbsp; The difference may be in whether or not pooling is opportunistically turned on in JDK 8 vs 7.&amp;nbsp; A line from the Oracle docs indicate that the behavior I am seeing is in line with a idle connections waiting to garbage collect, and when no timeout is set.&amp;nbsp; See the section on Idle Connections at &lt;/SPAN&gt;&lt;A href="http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-ldap.html" rel="nofollow noopener noreferrer"&gt;http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-ldap.html&lt;/A&gt;&lt;SPAN&gt; :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;When the application is finished with a pooled connection (by invoking Context.close() on all contexts that share the connection), the underlying pooled connection is marked as idle, waiting to be reused. By default, idle connections remain in the pool indefinitely until they are garbage-collected. If the "com.sun.jndi.ldap.connect.pool.timeout" System property has been set, the LDAP provider will automatically close and remove pooled connections that have been idle for more than the specified period.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tuned the garbage collection settings to avoid stop-the-world collection events… and it seems that is highlighting the potential for the file descriptor leak when the pooling settings are overly reliant on garbage collection for resource cleanup.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Nov 2015 17:15:26 GMT</pubDate>
    <dc:creator>gregdavisfromnj</dc:creator>
    <dc:date>2015-11-11T17:15:26Z</dc:date>
    <item>
      <title>LDAP connection leaks for activiti-rest-webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ldap-connection-leaks-for-activiti-rest-webapp/m-p/210470#M163600</link>
      <description>I've recently started doing some load testing, and am finding that when deployed in Tomcat, and with version 5.17.0, the REST Web Application is leaking LDAP connections when configured to use LDAP authorization.I've setup a context XML file to configure the application, with the LDAP config parts l</description>
      <pubDate>Tue, 10 Nov 2015 22:19:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ldap-connection-leaks-for-activiti-rest-webapp/m-p/210470#M163600</guid>
      <dc:creator>gregdavisfromnj</dc:creator>
      <dc:date>2015-11-10T22:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP connection leaks for activiti-rest-webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ldap-connection-leaks-for-activiti-rest-webapp/m-p/210471#M163601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When I set the connection pooling properties when starting the JVM (rather than or at least in addition to the bean config above), I see the connection count ramp up, then drop every few minutes.&amp;nbsp; So it looks like I am not setting those properties in the bean config properly… or they don't belong there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an aside, I also upgraded to JDK 8 when upgrading to 5.17.0 (that was not a great idea, should have changed one thing at a time).&amp;nbsp; The difference may be in whether or not pooling is opportunistically turned on in JDK 8 vs 7.&amp;nbsp; A line from the Oracle docs indicate that the behavior I am seeing is in line with a idle connections waiting to garbage collect, and when no timeout is set.&amp;nbsp; See the section on Idle Connections at &lt;/SPAN&gt;&lt;A href="http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-ldap.html" rel="nofollow noopener noreferrer"&gt;http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-ldap.html&lt;/A&gt;&lt;SPAN&gt; :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;When the application is finished with a pooled connection (by invoking Context.close() on all contexts that share the connection), the underlying pooled connection is marked as idle, waiting to be reused. By default, idle connections remain in the pool indefinitely until they are garbage-collected. If the "com.sun.jndi.ldap.connect.pool.timeout" System property has been set, the LDAP provider will automatically close and remove pooled connections that have been idle for more than the specified period.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tuned the garbage collection settings to avoid stop-the-world collection events… and it seems that is highlighting the potential for the file descriptor leak when the pooling settings are overly reliant on garbage collection for resource cleanup.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2015 17:15:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ldap-connection-leaks-for-activiti-rest-webapp/m-p/210471#M163601</guid>
      <dc:creator>gregdavisfromnj</dc:creator>
      <dc:date>2015-11-11T17:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP connection leaks for activiti-rest-webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ldap-connection-leaks-for-activiti-rest-webapp/m-p/210472#M163602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;With my pooling properties… there is a different problem.&amp;nbsp; For an LDAP pool maxsize=10, I can issue 10 HTTP requests to the REST web app.&amp;nbsp; Thereafter, it hangs, but I don't see any errors in the catalina.out file about exceeding file descriptor limits.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2015 17:56:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ldap-connection-leaks-for-activiti-rest-webapp/m-p/210472#M163602</guid>
      <dc:creator>gregdavisfromnj</dc:creator>
      <dc:date>2015-11-11T17:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP connection leaks for activiti-rest-webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ldap-connection-leaks-for-activiti-rest-webapp/m-p/210473#M163603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running into a hotspot with BasicAuthenticationProvider authenticating requests (with LDAP) to Activiti-Rest. 99% of the time taken by the requests are spent in JNDI. I assume I will need some kind of connection pooling for LDAP. Did you get your configuration working correctly? I am using Activiti 5.19.2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 23:06:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ldap-connection-leaks-for-activiti-rest-webapp/m-p/210473#M163603</guid>
      <dc:creator>srini_n</dc:creator>
      <dc:date>2016-03-17T23:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP connection leaks for activiti-rest-webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ldap-connection-leaks-for-activiti-rest-webapp/m-p/210474#M163604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It works, but only with forced periodic garbage collection. At some point I'm going to look into just using Spring LDAP authentication rather than the Activiti authentication. But I suspect I'll have the same problems with the Oracle LDAP client.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are burning CPU inside of JNDI, make sure that you have your filters defined as tight as possible. It sounds like you are getting back too many results from the LDAP server to evaluate. Try using JXplorer or LDAPBrowser to replicate the authentication queries, so you see what Activiti is dealing with from the LDAP server.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 13:04:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ldap-connection-leaks-for-activiti-rest-webapp/m-p/210474#M163604</guid>
      <dc:creator>gregdavisfromnj</dc:creator>
      <dc:date>2016-03-18T13:04:41Z</dc:date>
    </item>
  </channel>
</rss>

