You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by David Delbecq <de...@oma.be> on 2006/02/28 14:59:05 UTC

Help on JNDI store, Threads explosion

Hello,

This is a call to people who could have played with the
JNDIPrincipalStore in slide, help from original devel would be welcomed too.

We are using slide with user system based on a JNDIPrincipalStore (see
configuration below). The jndi store uses the NIS context provider (can
be downloaded at sun's website). This allows tomcat and all webapp to do
user management based on exported unix yellow page. This works well on
tomcat and in shark. There are about 400 users in the database. But
somehow, slide implementation of jndi store is broken. It does not
release it's jndi connections. I tried to track where it was doing so,
but had no luck. The big problem with it, is we reached a maximum limit
in the number of users slide can handle on NIS. When we point a DAV
client to DAV/users, it creates a bunch of thread. Those are used by NIS
provider to handle search results it seems. But insteed of releasing the
thread after each query, slide way of using JNDI somehow keeps the
connection. Thread number is growing very quickly and in half a seconds
i end up with more than 700 reader threads in the JVM. In production
environment we simple end up with a java.lang.OutOfMemoryError: could
not create native thread !!! Eventually after a few minutes, those
thread will be stopped (probably the provider somehow detecting lost
enumeration during a gc process :/) but it's unfortunatly too late.

Please note, once again, i use nisprovider in other places, calls to
related methods does not leave any thread behind (I see in eclipse the
thread are created but they are discarded as soon as not used anymore)

Our production environment is currently in big trouble due to all those
unreleased threads (reaching the OS limit on threads per process each
time a user access /DAV/users).

Now, if anybody has any idea on what to do....

Configuration of JNDIProvider:

            <store name="ldapusers">
                <nodestore
classname="org.apache.slide.store.txjndi.JNDIPrincipalStore">
                    <parameter name="cache.refresh.checkrate">15</parameter>
                    <parameter name="cache.refresh.rate">800</parameter>
                    <parameter
name="cache.refresh.threshold">200</parameter>
                    <parameter name="jndi.container">user</parameter>
                    <parameter name="jndi.attributes.rdn">cn</parameter>
                    <parameter
name="jndi.search.scope">ONELEVEL_SCOPE</parameter>
                    <parameter name="jndi.search.attributes">loginShell,
uid, gecos, cn, homeDirectory</parameter>
                    <parameter
name="java.naming.provider.url">nis://gurung/space</parameter>
                    <parameter
name="java.naming.factory.initial">com.sun.jndi.nis.NISCtxFactory</parameter>
                </nodestore>
                <securitystore>
                    <reference store="nodestore"/>
                </securitystore>
                <lockstore>
                    <reference store="nodestore"/>
                </lockstore>
                <revisiondescriptorsstore>
                    <reference store="nodestore"/>
                </revisiondescriptorsstore>
                <revisiondescriptorstore>
                    <reference store="nodestore"/>
                </revisiondescriptorstore>
                <contentstore>
                    <reference store="nodestore"/>
                </contentstore>
            </store>

regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org