Java Heap memory problem

View: New views
2 Messages — Rating Filter:   Alert me  

Java Heap memory problem

by Azwidohwi Swethane :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,

 I have a Java mail listener that picks up email from an IMAP server about 10 emails at a go. The listener then invoke an EJB method sending each message for processing. However, every time i deploy the application my heap memory keep rising until server crashes. I tried profiling the application but i can't pin point the problem so far.

Any advice would be welcome if you have experience with processing high volume emails. Its my first time using java mail for high volume message processing.

David
=========================================================================== To unsubscribe, send email to listserv@... and include in the body of the message "signoff JAVAMAIL-INTEREST". For general help, send email to listserv@... and include in the body of the message "help".


Re: Java Heap memory problem

by Bill Shannon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Azwidohwi Swethane wrote:

> Hi All,
>
>  I have a Java mail listener that picks up email from an IMAP server
> about 10 emails at a go. The listener then invoke an EJB method sending
> each message for processing. However, every time i deploy the
> application my heap memory keep rising until server crashes. I
> tried profiling the application but i can't pin point the problem so far.
>
> Any advice would be welcome if you have experience with processing high
> volume emails. Its my first time using java mail for high volume message
> processing.

You've heard of the bisection method of debugging, right?

Eliminate half of your program and see what difference it makes.
Then eliminate the other half and see what difference it makes.

Instead of actually reading email, generate fake data and process it.

Instead of actually processing the data with an EJB, just throw the data
away.

See if either half causes your server memory to increase.

Repeat as necessary to narrow down the source of the problem.

===========================================================================
To unsubscribe, send email to listserv@... and include in the body
of the message "signoff JAVAMAIL-INTEREST".  For general help, send email to
listserv@... and include in the body of the message "help".