To Apache LDAP API guys, First, thank you because we are successfully using Apache LDAP API in Ldap Synchronization Connector Open Source project (build 1.0.0-M25). But we encountered an error that seems to be linked to its usage. That's probably because we are using it in a wrong way, but we cannot figured why. Let me introduce the use case: LSC is providing synchronization services based on a source to a destination. Source can be a LDAP directory and there is a mode to run it as a daemon. It's using LDAP Content Synchronization Protocol to attach it to an OpenLDAP directory and to be able to catch updated entries to sync them to a destination (database, another directory, ...). In this configuration, after 1,5 hour the JVM is throwing an OutOfMemory error with "unable to create new native threads". You will find below a pastebin to the thread dump that have been generated each 15 minutes which mainly shows thread pool tasks. The fact is LSC is using its own thread pool, but my understanding of the thread dump is that most threads are linked to MINA and to other threads WAITING for MINA threads.
http://pastebin.fr/37581 The source code that create LDAP connection through LDAP Apache API and launches asynchronous search can be found at the following location: https://lsc-project.org/svn/lsc/branches/v2.1/src/main/java/org/lsc/service/SyncReplSourceService.java There's no direct use of Apache LDAP API in the rest of the project (we are also using JNDI). If you have any idea of the reason why we are encountering such issue or at least a method to identify it, it would be welcomed :) The exception: Exception in thread "pool-1974-thread-1" java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.addWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.processWorkerExit(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exception in thread "Sync" java.lang.NullPointerException at org.lsc.service.SyncReplSourceService.getNextId(SyncReplSourceService.java:292) at org.lsc.AsynchronousRunner.run(AbstractSynchronize.java:628) at java.lang.Thread.run(Unknown Source) Sebastien BAHLOUL IAM / Security specialist Ldap Synchronization Connector : http://lsc-project.org Blog : http://sbahloul.wordpress.com/
