Confluence : Fix 'Out of Memory' errors by increasing available memory
This page last changed on Apr 20, 2007 by ganand.
I am getting Out of Memory errors, how can I allocate more memory to tomcat? Since the default memory setting usually is around 64 or 128MB (256MB in Confluence 2.2 and later), you might have to adjust the settings to run a bigger Confluence instance with sufficent memory. Users running Confluence as a service please refer to the Start Confluence automatically on Windows as a Service page. For users running Tomcat standalone, you will have to change the following settings: Confluence 2.2 or later (Tomcat 5.5)Do not set your memory using CATALINA_OPTS this is overridden by JAVA_OPTS. On Linux
An example of a minimal setting for a large system - max heap size is set to 1Gb : JAVA_OPTS="-Xmx1024m $JAVA_OPTS -Djava.awt.headless=true " On Windows
Confluence 2.1 and earlier (Tomcat 4.0)On Linux The line you add should go just before the line starting exec "$PRGDIR... On Windows For example if you want to allocate a minimum heap size of 256MB and a max heap size of 512MB you will have to write the following on Windows: The line you add should go just before the line starting call "%EXECUTABLE%"... If you are running tomcat 5.5 via tomcat.exe, you can update the heap size by running tomcatw.exe and setting the required values via the Java tab. Other NotesOn OS X If you get the error message: java.lang.OutOfMemoryError: PermGen space this means that you have exceeded Java's fixed 64Mb block for loading class files. You will need to add the argument -XX:MaxPermSize=128m to CATALINA_OPTS, in addition to any argument you use to set the heap size. Please refer to this link for more information. RELATED TOPICSManaging Application Server Memory Settings |
![]() |
Document generated by Confluence on May 01, 2007 19:29 |