Many ldap Thread-### threads created in the JVM at once

Solution Verified - Updated

Environment

  • JBoss Enterprise Application Platform (EAP)
  • Java

Issue

  • We noted a growing amount of threads in our JVM and they are all generically named Thread-###. It looks like they have something to do with ldap.

Resolution

  • These threads are tied to their com.sun.jndi.ldap.Connections. They would die when the ldap connections are closed. If seeing such a large amount, you should look into some better ldap connection pooling and reuse.

Root Cause

  • A growing amount of ldap connections.

Diagnostic Steps

  • Capture a thread dump and heap dump. Trace the ldap connections in the heap dump to what is referencing and preserving them.
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.