OutOfMemory Errors in Crowd

Still need help?

The Atlassian Community is here for you.

Ask the community

I am getting 'Out of Memory' errors. How can I allocate more memory to Crowd?

Heap memory

Since the default memory setting usually is 256MB in Crowd, you might have to adjust the settings to run a bigger Crowd instance with sufficient memory.

To increase heap space allocated to Crowd, increase the -Xmx value to something greater.

Permanent Generation size

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 and increase the memory.

  • JDK 1.4 does not provide information as to why the OutOfMemory error occurred.
  • JDK 1.5 and above are recommended as they provide a description of the error as in the above example.

On Windows

Edit the JAVA_OPTS property defined in ../apache-tomcat/bin/setenv.bat file.

If you are running Crowd a service then refer to this documentation

On Linux

Edit the JAVA_OPTS property defined in ../apache-tomcat/bin/setenv.sh file.

Allocating too much memory to your JVM Heap can also cause OutOfMemory Errors.

The error java.lang.OutOfMemoryError: unable to create new native thread occurs when the operating system is unable to create new threads. This is due to the JVM Heap taking up the available RAM.

To fix this problem, you should reduce the size of your JVM Heap and also the size of the stack per thread.
The stack size can be changed with the following (example) parameter:

"-Xss512k"

Please refer to the following guide as a reference for JVM tuning: http://goobsoft.homeip.net/Wiki.jsp?page=JavaDebianTuning.

Allocating large maximum heap and low minimum heap can slow down Crowd

If Xmx is much (much) larger than Xms Java will spend long periods of time in garbage collection to reach the Xms goal. This will slow down Crowd performance.

If you need to increase Xmx also increase Xms as well to avoid that scenario.

Getting a memory dump on OOM errors

Passing in -XX:+HeapDumpOnOutOfMemoryError will make the JVM create a memory dump, when it runs out of memory.

 

Last modified on Oct 12, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.