Excessive memory usage in OpenFire VM when Crowd is started
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Each time Crowd is started, although ps aux
shows that Crowd only takes Xmx + XX:MaxPermSize of physical memory, the VM's memory usage will spike to a level near the limit of the VM's physical memory.
Cause
By default, Atlassian applications such as Crowd will not use more physical memory (RES) than the specified Xmx + XX:MaxPermSize in JAVA_OPTS. This is however, not true with applications hosted in OpenFire. OpenFire does not seem to respect the limits specified in JAVA_OPTS, it only does so with INSTALL4J_ADD_VM_PARAMS.
Resolution
Shutdown Crowd
Navigate to
CrowdInstallation/apache-tomcat/bin
and edit setenv.shAdd the following line:
1 2 3
INSTALL4J_ADD_VM_PARAMS="-Xms256m -Xmx512m -XX:MaxPermSize=256m $JAVA_OPTS -Djava.awt.headless=true " export INSTALL4J_ADD_VM_PARAMS
Set the Xmx, Xms and MaxPermsize based on your requirements
Startup Crowd
Was this helpful?