Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 89111 invoked from network); 13 Jun 2006 22:43:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jun 2006 22:43:44 -0000 Received: (qmail 92024 invoked by uid 500); 13 Jun 2006 22:43:44 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 91985 invoked by uid 500); 13 Jun 2006 22:43:43 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 91971 invoked by uid 99); 13 Jun 2006 22:43:43 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jun 2006 15:43:43 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jun 2006 15:43:42 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 97A6C714204 for ; Tue, 13 Jun 2006 22:42:30 +0000 (GMT) Message-ID: <16754409.1150238550618.JavaMail.jira@brutus> Date: Tue, 13 Jun 2006 22:42:30 +0000 (GMT+00:00) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Subject: [jira] Commented: (DIRSERVER-644) Memory Leak in Persistent search ? In-Reply-To: <32807071.1150180769879.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DIRSERVER-644?page=comments#action_12416096 ] Emmanuel Lecharny commented on DIRSERVER-644: --------------------------------------------- That's good news ! However, requests are not supposed to be long here : they are simple search with a DN as key. The request must be discarded when the result has been sent to the client, not when the session dies. Now, is it necesary to store this request ? What is this good for? If we have a very long request, like a search through all the base, then we will have three cases : 1) there is a time limit : we returns the data we found at this point. 2) there is a size limit : we returns the data we found at this point. 3) there are no limit : we wait for the server to build the full result, and we send it back to the client. I any case, we don't need the Request to be stored, am I totally wrong ? > Memory Leak in Persistent search ? > ---------------------------------- > > Key: DIRSERVER-644 > URL: http://issues.apache.org/jira/browse/DIRSERVER-644 > Project: Directory ApacheDS > Type: Bug > Components: core > Versions: 1.0-RC3 > Reporter: Emmanuel Lecharny > Assignee: Alex Karasulu > Priority: Blocker > Fix For: 1.0-RC4 > Attachments: SearchTest.java > > After having profiled memory, it seems we have a memory leak in SessionRegistry. > A little test (attached) does a search N times for N threads, and for each search, a OutstandingRequest is attached to the session. After a few thousands of search we fall in OOM. I've put some trace in those methods : > SessionRegistry.addOutstandingRequest > and > SessionRegistry.removeOutstandingRequest > Session Released > addOutstandingRequest 2 > addOutstandingRequest 3 > addOutstandingRequest 4 > ... ( 100 requests) > addOutstandingRequest 99 > addOutstandingRequest 100 > addOutstandingRequest 101 > remove session > The SessionRegistry.removeOutstandingRequest is never called, except if an exception is raised (NamingException). > It may be on purpose ( persistent search), but we can't assume the server will be able to hold as many OutstandingRequest as we have search requests - or entries -. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira