Memory leak problem?

Use this forum for questions regarding adoption and functionality of OpenEMM

Moderator: moderator

paulmto
Posts: 7
Joined: Tue Apr 03, 2012 10:22 am

Memory leak problem?

Post by paulmto » Thu Apr 05, 2012 4:50 pm

Hello,

I am testing OpenEmm with a lot of subscribers (more than 2,000,000).

I always have a "Java.lang.OutOfMemoryError: Java heap space" error when I try to generate a mailing (without any templating or tag in it).

I changed the JAVA_OPTIONS (as the documentation said) and added all my available memory (2go), but it's still the same.
I did my test on a new OpenEmm installation, and nothing in the database except 1 mailing, 1 mailingList and the recipients.

For 2,000,000 recipients the generation stopped very fast (few minutes) but with 1,000,000 recipients it crashed after 2.5 hours and 95% of the generation done.

I just want to know if you can tell me:

- how much memory do I need to send around 2,000,000 emails for one mailingList?
- Can I change something to no longer get the "Java.lang.OutOfMemoryError: Java heap space" error, even if the generation will be very slow?
(Is there a parameter to limit the used memory)?
- If not, is the memory better managed in the 2012 OpenEmm version?

Thanks,

Best Regards.

unhuman
Posts: 46
Joined: Mon Jan 23, 2012 10:29 pm

Re: Memory leak problem?

Post by unhuman » Thu Apr 05, 2012 7:44 pm

Java has standard parameters on the JVM (which you can specify in the openemm.sh script):

There are lots of articles like this one:
http://javarevisited.blogspot.com/2011/ ... e-jvm.html

paulmto
Posts: 7
Joined: Tue Apr 03, 2012 10:22 am

Re: Memory leak problem?

Post by paulmto » Fri Apr 06, 2012 9:04 am

Thanks unhuman for the answer.

But as I said in my previous message I already change the JAVA_OPTIONS in the openemm.sh script to put all my available memory (2go).

So my question is how can I get OpenEmm working with 2go of memory, or how much memory do I need to send 2,000,000 emails in one mailingList.

Thanks,

Best Regards.

paulmto
Posts: 7
Joined: Tue Apr 03, 2012 10:22 am

Re: Memory leak problem?

Post by paulmto » Mon Apr 16, 2012 9:24 am

Hello,

Is there any answer for my issue ?

Thanks,

Best Regards.

unhuman
Posts: 46
Joined: Mon Jan 23, 2012 10:29 pm

Re: Memory leak problem?

Post by unhuman » Mon Apr 16, 2012 9:41 pm

Perhaps begin by debugging the code that does the email generation. If I recall correctly, the code generates XML for all emails at the same time... The logic might currently pull down the entire list of 2M users and then begin processing - which could be a problem. You could examine that code...

MailgunImpl.java doExecute(). My code for MailgunImpl is diverged to do some other processing, so I can't give you an exact line number, however, rset = data.dbase.execQuery (query); is where it happens.

It builds a query to get all the customers of the mailinglist. I suspect that this code will need to be changed to work with a cursor to handle the list incrementally.

-H

Post Reply