The problem is with our own custom mailet.  Our mailet acts as a SMTP to HTTP proxy, 
but we strip out attachments and persist them to a database first to cut down on the 
amount of data being passed to the servlet.  Our problem had to do with streaming the 
attachments back to our db2 database.  I don't recall the exact problem.

I just mentioned our use of byte arrays as an example of something that you do not 
want to do in a mailet if you are going to have large messages.  

We never had a problem with james handling large messages, but we really only use the 
hostis matcher and our custom mailet.

We are using the IBM 1.3.1.05 JVM with a min heap size of 128 megabytes and a maximum 
heap size of 256 megabytes.

-Brian
-----Original Message-----
From: Lindsay Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, June 23, 2003 4:02 PM
To: James Users List
Subject: RE: 100MB email produces an out of memory exception


Brian,
What were the problems you encountered with using streams?
Is this a problem you found in one of your own custom Mailets?
When I've seen the OutOfMemoryException it's when using just the standard
mailets.

Thanks for any advice you can give.

Lindsay


-----Original Message-----
From: Horsfall, Brian [mailto:[EMAIL PROTECTED]
Sent: 23 June 2003 21:51
To: James Users List
Subject: RE: 100MB email produces an out of memory exception


Noel,
You are correct.  Our mailet is our problem with memory usage.

Our Mailet uses byte arrays to handle attached files.  Byte arrays require
that the entire attachment gets loaded into memory.  Originally we didn't
have to worry about attachments greater than 5 megabytes, so we never had a
problem with the byte arrays, until our users requested the ability to
handle 50 megabyte attachments.  That's when the out of memory errors
started.

The quick fix was to throttle the system using the number of threads in the
spool manager.  A better fix would be to utilize streams instead of byte
arrays.  We did try and use streams, but we had problems, and the volume of
mail that we are handling is small enough that we can get by with one
thread.

-Brian


-----Original Message-----
From: Noel J. Bergman [mailto:[EMAIL PROTECTED]
Sent: Monday, June 23, 2003 3:22 PM
To: James Users List
Subject: RE: 100MB email produces an out of memory exception


Brian,

Thanks for the report.  That is good to know, and helpful.  :-)

But James really should not be loading the entire message content into
memory unless some matcher or mailet is asking for it, so it would be good
to track down what is causing the memory load.

        --- Noel

-----Original Message-----
From: Horsfall, Brian [mailto:[EMAIL PROTECTED]
Sent: Monday, June 23, 2003 13:21
To: James Users List
Subject: RE: 100MB email produces an out of memory exception


We are successfully passing 50 megabyte messages around with James.  We had
to set the spool manager to one thread to keep from processing 2 large
messages at once, which would typically trigger a JVM out of memory error.

If you have a dedicated server with lots of memory, you may be able to get
away with multiple threads.  We are running James on a shared server, so we
try and be good "citizens" by limiting our JVM to 256 megs of memory.

-Brian

-----Original Message-----
From: Noel J. Bergman [mailto:[EMAIL PROTECTED]
Sent: Monday, June 23, 2003 12:08 PM
To: James Users List
Subject: RE: 100MB email produces an out of memory exception


> i am running James 2.1.3 (Win 2k - Sun Java 1.4.x), using the file
> system as mail store. Having set-up a single user, i send a 100MB
> email which produces an out of memory exception on the command
> line. No other log entries can be found.

Turn on DEBUG for all targets in SAR-INF/environment.xml, and let's get a
better idea of where it is happening.

> - What are your experiences with large emails (can it be done).

I've only done smaller numbers of megabyte mail.  Some people have reported
about 10MB or so.

> - How do i set the -xm memory switch for the JVM.

See run.bat

> - How do i put the JVM in server mode.

See run.bat

        --- Noel


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


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



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


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




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


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

Reply via email to