Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-512

OutOfMemoryError -- object not released.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0
    • Labels:
      None
    • Environment:
      windows XP,
      Java 1.5.0_06

      Description

      I use the file system to store the emails.

      When I run the James for a long time, the james server used more and more heap memory, eventually it runs out of memory and refuse to receive email. only restart the james will work.

      I used JProfile Memory Debugger(you can get the trial version from www.quest.com) and found a clue. the object allocated from following code at line 92 does not always get released, cause the memory been used up eventually. I will attach a picture file showing the call stack.

      91, final OutputStream outputStream = getOutputStream( key );
      92, final BufferedOutputStream stream = new BufferedOutputStream( outputStream );
      93
      94, final Object o = m_outputs.get( key );
      95, if( null == o )
      96,

      { 97, m_outputs.put( key; stream ); 98, }

      99, else if( o instanceof ArrayList )
      100,

      { 101, ( (ArrayList)o ).add( stream ); 102, }

      103, else
      104,

      { 105, final ArrayList list = new ArrayList(); 106, list.add( o ); 107, list.add( stream ); 108, m_outputs.put( key; list ); 109, }

      110
      111, return stream;

        Attachments

        1. james-512.patch
          11 kB
          Stefano Bagnara
        2. picture.GIF
          18 kB
          Quande Ren

          Activity

            People

            • Assignee:
              noel Noel J. Bergman
              Reporter:
              r_q_d Quande Ren
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: