cancel
Showing results for 
Search instead for 
Did you mean: 

Community 4.2b Linux Java Out Of Memory Issues

jedmondson
Champ in-the-making
Champ in-the-making
I'm running a clean install of Community 4.2b on a brand new RHEL6 instance and appear to be having java issues.

I am running RHEL6 in RHEV/RHEV-M Environment:
    Welcome to Red Hat Enterprise Virtualization Manager.
    Version 3.0.7_0001-2.el6_3
The virtual:
    Linux cralfrescorhel 2.6.32-279.11.1.el6.x86_64 #1 SMP Sat Sep 22 07:10:26 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
    Physical Memory Guaranteed:
    6144 MB
    Number of CPU Cores:
    4 (2 Socket(s), 2 Core(s) per Socket
Performed a simple install and configured, everything was up and running, no errors in the log files.
2 hours into copying data into a new site (through CIFS) the server was non-responsive and the logs start filling up with errors:

java.lang.OutOfMemoryError: GC overhead limit exceeded

I searched around and tried changing the java parameters in /opt/alfresco-4.2.b/scripts/setenv.sh
##### JAVA ENV #####
JAVA_HOME=/opt/alfresco-4.2.b/java
JAVA_OPTS="-server -Xms2G -Xmx4G -XX:MaxPermSize=256M -XX:NewSize=1G -Xss1M -verbose:gc -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:CMSInitiatingOccupancyFraction=70"

export JAVA_HOME
export JAVA_OPTS
##### POSTGRES ENV #####

After reboot I'm now receiving Java heap space errors:

Exception in thread "http-apr-8080-exec-5"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "http-apr-8080-exec-6"
java.lang.OutOfMemoryError: Java heap space

What other changes can I need to make to avoid the Java heap space errors and continue trying to make 4.2.b run?

Thanks.

Joe
5 REPLIES 5

abarisone
Star Contributor
Star Contributor
Hi,
for issues about memory take a look to this https://forums.alfresco.com/en/viewtopic.php?f=9&t=46736&hilit=+memory
Specifically, about configuration look at this http://wiki.alfresco.com/wiki/Full-Text_Search_Configuration

Regards,
Andrea

jedmondson
Champ in-the-making
Champ in-the-making
Apparently the earlier parameters did not fix the problem (I thought it was fixed, however in loading another chunk of data today the same issues cropped up).

I have now adjusted the virtual up to 16GB and set the min java to 8GB, max to 16GB and it makes no difference.

This has not been an issue in any previous version of alfresco, any suggestions on how to resolve this issue?

Thanks.

Joe

jedmondson
Champ in-the-making
Champ in-the-making
I'm am not certain that the changes that I'm putting in /opt/alfresco-4.2.b/scripts/setenv.sh are taking effect.
I'm watching the virtuals usage and RAM is never above 13% even whet I've configured it with -Xms8G -Xmx16G

What is the correct way to set the java parameters so that when running "service alfresco start" the parameters will be used?

jedmondson
Champ in-the-making
Champ in-the-making
For anyone else there running into this problem.

You need to modify the file:
/opt/alfresco-4.2.b/tomcat/scripts/ctl.sh

If you try to modify your java settings anywhere else this ctl.sh file will override them when alfresco starts.

I have bumped my -Xms size to -Xms2G and -Xmx to -Xmx4G and i no longer receive out of memory errors.

I'm not a java/tomcat person so if anyone would like to elaborate on these options and suggest a better combination please feel free, but as a quick fix this is working for me for now.

Thanks.

Joe

Thanks a lot for this help!

Guilherme