cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Alfresco 3.3 Community Edition on ubuntu

mijelh
Champ in-the-making
Champ in-the-making
I've been struggling to install alfresco 3.3 CE on a test server for a demonstration, without much success.
Every time I start Alfresco, after a few clicks the application crashes:

tomcat/logs/catalina.2010-04-21.log
21-Apr-2010 15:44:28 org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request processing
java.lang.OutOfMemoryError: PermGen space
tomcat/logs/catalina.out
Exception in thread "DefaultScheduler_QuartzSchedulerThread" 21-Apr-2010 15:44:28 org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request processing
java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space
Exception in thread "RMI RenewClean-[127.0.1.1:50507]" java.lang.OutOfMemoryError: PermGen space
15:44:53,344  ERROR [transaction.SpringAwareUserTransaction.trace] Detected first UserTransaction which is being garbage collected without a commit() or rollback()
15:44:55,089  ERROR [transaction.SpringAwareUserTransaction.trace] Logging of transaction call stack is now enabled and will affect performance
Exception in thread "AlfrescoJbpmJobExecutor:127.0.1.1:1" java.lang.OutOfMemoryError: PermGen space

I start java with:
export JAVA_OPTS='-Xms128m -Xmx1024m -XX:MaxPermSize=128m -server'
export JAVA_OPTS="${JAVA_OPTS} -Dalfresco.home=${ALF_HOME} -Dcom.sun.management.jmxremote"
# Following only needed for Sun JVMs before to 1.5 update 8
export JAVA_OPTS="${JAVA_OPTS} -XX:CompileCommand=exclude,org/apache/lucene/index/IndexReader\$1,doBody -XX:CompileCommand=exclude,org/alfresco/repo/search/impl/lucene/index/IndexInfo\$Merger,mergeIndexes -XX:CompileCommand=exclude,org/alfresco/repo/search/impl/lucene/index/IndexInfo\$Merger,mergeDeletions"

I have only 1GB RAM so maybe I should use a lower xmx, but if I do so, an "out of memory" exception invariably happens (I mean, even earlier). Does alfresco really needs so much memory? I assume it doesn't, because default xmx is 516. Besides, using 500mb RAM when no content is to be indexed, and a single user is logged in seems an "overkill".

What am I doing wrong?

My system:
-Ubuntu 9.10
-java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02, mixed mode)
-1GB ram
-Intel Core 2 Duo T7500
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
You need to increase your MaxPerm setting above 128MB.   Try 150 or 200 if that still gives PermGen errors. 

And yes you will struggle to run Alfresco on 1GB of RAM.   You should ideally have enough RAM so that the OS never needs to page java out.

You can detune alfresco by reducing the number of JLAN and index worker threads and possibly by reducing the stack size for each thread.   You may also be able to turn off or disable services that you don't need.

mijelh
Champ in-the-making
Champ in-the-making
Thanks for the quick reply, it seems to have solved the problem.

However, I have now two questions regarding memory usage:
I don't mid alfresco going slow on my test computer (it's just for testing after all), and memory is cheap, so if I ever use it for production I can just buy more RAM., but:
1) When a PermGem error happen, AFAIK the only solution is to reboot both java and alfresco, so there is a chance that the server get blocked needing a manual restart. Is there any mechanism to prevent this from happening?
2) How fast does memory usage increase with more users/documents? is there any data on this?

mrogers
Star Contributor
Star Contributor
1) When a PermGem error happen, AFAIK the only solution is to reboot both java and alfresco, so there is a chance that the server get blocked needing a manual restart. Is there any mechanism to prevent this from happening?
PermGen errors are bad news.    But its very unlikely that you will get PermGen errors once Alfresco is up and running.   Whether you need to restart depends upon which application server you are using.  For example WebSphere and WebLogic will probably allow your to configure memory through their admin consoles.

2) How fast does memory usage increase with more users/documents? is there any data on this?
Yes there's various sources of benchmarking data, but as with all things performance related it depends more
upon what your users are doing. :wink:      

http://wiki.alfresco.com/wiki/JVM_Tuning

mijelh
Champ in-the-making
Champ in-the-making
Everything points to the fact that 1 GB RAM is just not enough for running Alfresco with my current configuration. I think it's ridiculous not to expend those 20€ or so on an additional GB of RAM so that's exactly what I'm doing.

Thank you very much for your help.