OutOfMemoryError when view the Customers

Use this forum for questions regarding adoption and functionality of OpenEMM

Moderator: moderator

mickyo
Posts: 2
Joined: Thu Jun 26, 2008 10:14 pm

OutOfMemoryError when view the Customers

Post by mickyo »

Hy,

today i have make a Update from 5.3.2 to 5.5.0
Since this Time i can´t view the Customers, we have >350000 Customer.
Everytime when i want to view i got
500 Servlet Exception
java.lang.OutOfMemoryError: Java heap space

with 5.3.2 i have no problem only 1-2 minutes time for show.

Thanks
MickyO
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

allocate more memory

Post by maschoff »

Beginning with release 5.5.0 OpenEMM loads the whole list into memory (it has to, otherwise the AJAX list sorting would not be possible). In your case this means 350,000 customer records - but your memory ("heap space") seems to be to small.

Therefore, you should allocate more heap space to the Java VM via Resin's configuration file core.conf in /home/openemm/conf. Insert in section <server> right after line <http server-id="core" host="*" port="8080"/>

Code: Select all

<jvm-arg>-Xms512M</jvm-arg>
<jvm-arg>-Xmx512M</jvm-arg>
which allocates an heap space of initially and maximum 512 MByte, but stop OpenEMM first. If 512 MByte is not enough, try 768 MByte (-Xmx768M).
Last edited by maschoff on Sat Jun 28, 2008 7:39 pm, edited 2 times in total.
OpenEMM Maintainer
mickyo
Posts: 2
Joined: Thu Jun 26, 2008 10:14 pm

delete some customers

Post by mickyo »

Thank you, i will test it.
I think it is better to make the list smaller, from this 350000 customers are round about 200000 from a old, not used mailinglist.
Is it possible to delete the customers of this mailinglist, without delete them from perhaps other mailinglists.

Thanks
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

list management

Post by maschoff »

With OpenEMM 5.5 you can define special target groups and delete all recipients which belong to this target group with one click from the database (new feature).

For more complex list management you should export the recipients first by mailing list, manipulate them locally (like deleting fields or setting flags) and - after generating the new flag fields in OpenEMM - import them back with the option "update existing recipients".
OpenEMM Maintainer
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Ok, after experimenting we found out that the <jvm-arg>-example provided above for core.conf does not work in our case (although we used it exactly like noted in the Resin documentation ...).

If it does not work with you either, please try this instead (it works for us): Open file httpd.sh in /home/openemm/bin and add after line "per=perl" this code

Code: Select all

args=" -J-Xms128m -J-Xmx512m"
You can change the values, of course, to reflect different memory settings.
OpenEMM Maintainer
mmenke
Posts: 30
Joined: Fri Jul 24, 2009 12:14 pm
Location: Germany
Contact:

Post by mmenke »

ma wrote:Ok, after experimenting we found out that the <jvm-arg>-example provided above for core.conf does not work in our case (although we used it exactly like noted in the Resin documentation ...).

If it does not work with you either, please try this instead (it works for us): Open file httpd.sh in /home/openemm/bin and add after line "per=perl" this code

Code: Select all

args=" -J-Xms128m -J-Xmx512m"
You can change the values, of course, to reflect different memory settings.
Sorry to put the old thread to the top but I have a very similar problem (java.lang.OutOfMemoryError: Java heap space) when I want to send a mailing. It is only a testmailing, having 5 recipients. I tried your solution, but Resin does not start anymore when I add "-J-Xms128m -J-Xmx512m" to the additional arguments. The line already existed in my httpd.sh so I added your code. The line now looks like this:

args="-J-Dlog.home=/home/openemm/var/log -J-Dlog4j.configuration=emm.properties -J-Xms128m -J-Xmx256m"

I am running OpenEMM 5.5.1, 1GB of RAM, CentOS

Resin seems to start fine at the shell (no errors), but I cannot connect to port 8080. I even tried it on the server (just in case), but that did not work either.

PS: I recently added a lot of new images for the template (stored in the MySQL-DB) - maybe that is somehow causing the problem.. Before that it worked like for the last three days without any problems.

Hope someone can help :)

Thanks,

Marco
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Might be a problem with the Resin configuration. Please check file core.conf and core.sh of the next OpenEMM development version (scheduled for release early next week), maybe this will give you some idea.
OpenEMM Maintainer
mmenke
Posts: 30
Joined: Fri Jul 24, 2009 12:14 pm
Location: Germany
Contact:

Post by mmenke »

Thanks for the info - will try that. Good to hear the new version is coming soon :)

One thing about the images stored in the template/database: Once I removed these, the error didn't occure anymore (at least until now). So I think it was caused by the huge lot of images in this case (120+).
Post Reply