james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "OG (JIRA)" <server-...@james.apache.org>
Subject [jira] Commented: (JAMES-134) Large emails in the spool cause SpoolManager to throw OutOfMemoryError
Date Sun, 15 Jan 2006 23:32:20 GMT
    [ http://issues.apache.org/jira/browse/JAMES-134?page=comments#action_12362796 ] 

OG commented on JAMES-134:

Hello again. I have downloaded the james source code and took a closer look at the MimeMessage
which is the prime suspect here. However, it seems like the constructor "public MimeMessage(Session
session, InputStream is)" calls "parse(is)" and there it checks if "is instanceof SharedInputStream"
and only if not it reads the whole thing to the memory. So how it looks to me (which may be
wrong because I don't know a lot beyond it), is that if  "is" will be made to be a SharedInputStream
before it is passed on to the constructor of the MimeMessage than MimeMessage would not read
it to the byte array "content" and use it as is. 

So now I want to know if this is indeed the only place where such problems rise, and if finding
all calls to that constructors and replacing "is" with a "new MySharedIS(is)" would resolve
the issue. 

What do you think?

> Large emails in the spool cause SpoolManager to throw OutOfMemoryError
> ----------------------------------------------------------------------
>          Key: JAMES-134
>          URL: http://issues.apache.org/jira/browse/JAMES-134
>      Project: James
>         Type: Bug
>   Components: SpoolManager & Processors
>     Versions: 2.0a3, 2.1, 2.1.3, 2.2.0
>  Environment: Operating System: MacOS X
> Platform: Macintosh
>     Reporter: Matt Bishop
>  Attachments: TestMemRec.java
> Steps to repro:
> 1. Send yourself a very large email (16 megs works for me)
> 2. check the SpoolManager log and see this over and over:
> ERROR spoolmanager: Exception in JamesSpoolManager.run null
> java.lang.OutOfMemoryError
> What makes this problem particularly bad is that the spoolmanager doesn't move on to
> messages but keeps pegging the CPU trying to process this email.  To fix it, I have to
shut down 
> james, delete the email files out of spool and restart.
> EXPECTED: email should spool to the user as expected.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message