jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1037) Memory leak causing performance problems
Date Fri, 10 Aug 2007 09:55:42 GMT

    [ https://issues.apache.org/jira/browse/JCR-1037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518970
] 

Thomas Mueller commented on JCR-1037:
-------------------------------------

Hi,

Thanks for your video! It is the first time for me to get video coverage for a bug :-) In
the source code I saw:

updateDocument(Ticket ticket,...) {
  SessionManager manager = SessionManager.getInstance();
  Session session = manager.getSession(ticket);
  ...
  if(ticket.isAutocommit()) {
    session.save();
  }
}

SessionManager: are you using jlibrary? I found some source code here:
http://jlibrary.cvs.sourceforge.net/jlibrary/org.jlibrary.server/src/org/jlibrary/core/jcr/SessionManager.java?view=markup
I didn't know about jlibrary before. I saw a bug in SessionManager.getInstance() (and logged
it here: https://sourceforge.net/tracker/index.php?func=detail&aid=1771499&group_id=95837&atid=612439)
, but
I don't think it's related to our problem. What I didn't see in the source code is how you
set the session for a ticket. SessionManager seems to be a hash map where each ticket has
a session. How do you attach the sessions to the tickets? How many sessions are used? Could
you verify that only one or two sessions are used by adding:

  Session session = manager.getSession(ticket);
  System.out.println("ticket: " + ticket + " session: " + session);
  
Also we need to be sure there are no other sessions created (and not closed) elsewhere in
the application. Could you check jcr.log as well ('Session opened' messages), or add System.out
/ log to whereever sessions are opened and closed in your application?

Another question: is ticket.isAutocommit set to true?

Thanks,
Thomas


> Memory leak causing performance problems
> ----------------------------------------
>
>                 Key: JCR-1037
>                 URL: https://issues.apache.org/jira/browse/JCR-1037
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: Jackrabbit API
>    Affects Versions: 1.2.1, 1.2.2, 1.2.3, 1.3
>         Environment: Tomcat 6.0, XP Pro w/1Gb
>            Reporter: Antonio Carballo
>         Attachments: JCR-Trace.txt
>
>
> Folks,
> We have been running tests on JCR v1.3 and v1.2.1 for the past two weeks. The system
keeps running out of memory after X number of documents are added. Our initial test consisted
of about 50 documents and gradually increased to about 150 documents. The size of the documents
ranged from 1K to 9MB. We later changed the test to consist of files with less than 1K in
length with the same result. Increasing the heap size delays the error but the outcome is
always the same (Servlet runs out of heap memory.)
> Using JProbe we found a high number of references created by the caching sub-system (SessionItemStateManager.java,
SharedItemStateManager.java, LocalItemStateManager.java).  We changed the caching parameters
using CacheManager (min 64K - max 16MB). This change only delayed the error. Servlet eventually
runs out of heap memory.
> We are more than happy to share our findings (even source code and test data) with the
Jackrabbit team. Please let us know how you wish to proceed.
> Sincerely,
> Antonio Carballo

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message