Hi Marco,

Thanks for the info about JDK 1.5. FYI, I did modify James so it now stores the messages on file and not on RAM, and it is much faster this way, and huge messages are passed through with minimal memory (less then 20MByte). It is a fact, so not much more need to be said about it, but anyway my explanation for it is that loading a message like 20 times into the RAM and listening to the disk thrashing while Windows Virtual Memory page faults, is not as efficient as storing the message on disk once, and reading it from there. PS. Disk operation is much more time consuming than RAM, but virtual memory would end up using more Disk operations, if only RAM is being used.


From: "Marco Trevisan (JIRA)" <server-dev@james.apache.org>
To: [EMAIL PROTECTED]
Subject: [jira] Commented: (JAMES-134) Large emails in the spool cause SpoolManager to throw OutOfMemoryError
Date: Tue, 12 Sep 2006 02:53:24 -0700 (PDT)

[ http://issues.apache.org/jira/browse/JAMES-134?page=comments#action_12434107 ]

Marco Trevisan commented on JAMES-134:
--------------------------------------

Hello all,

My 2 cents about the problem:

First. JVM >= 1.5.0 have dynamic heap resizing: the problem about "memory releasing" can be solved by simply switching to JDK 1.5.0 or higher. It is still important to ensure the correct objects finalization in order for gc to do its work.

Second. About OG's early comment "A) A mail server shouldn't take so much RAM. It doesn't have to take RAM of the size of the messages that it delivers.": let's look at the situation at a little higher level. In order to process a mail message a mail server (which should be capable of processing it in complex ways) may need to have the whole message in RAM, i.e. when processing algorythms are not sequential and performance is welcome. In my opinion the message body should be kept in a file (as Rich said) only if there is no need to process it here.

Regards, Marco



> Large emails in the spool cause SpoolManager to throw OutOfMemoryError
> ----------------------------------------------------------------------
>
>                 Key: JAMES-134
>                 URL: http://issues.apache.org/jira/browse/JAMES-134
>             Project: James
>          Issue Type: Bug
>          Components: SpoolManager & Processors
>    Affects Versions: 2.1, 2.1.3, 2.0a3, 2.2.0
>         Environment: Operating System: MacOS X
> Platform: Macintosh
>            Reporter: Matt Bishop
>         Assigned To: Stefano Bagnara
> Attachments: JamesMimeMessage.java, JamesMimeMessage.java, 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 other > 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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to