Increasing Permanent Generation Memory Does Not Work
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
Changing JIRA_MAX_PERM_SIZE parameter in setenv.sh file does not have any effect on Permanent Generation Memory available in JIRA.
1
2
3
4
5
6
7
8
9
10
11
12
# Perm Gen size needs to be increased if encountering OutOfMemoryError: PermGen problems. Specifying PermGen size is not valid on IBM JDKs
JIRA_MAX_PERM_SIZE=256m
if [ -f "${PRGDIR}/permgen.sh" ]; then
echo "Detecting JVM PermGen support..."
. "${PRGDIR}/permgen.sh"
if [ $JAVA_PERMGEN_SUPPORTED = "true" ]; then
echo "PermGen switch is supported. Setting to ${JIRA_MAX_PERM_SIZE}"
JAVA_OPTS="-XX:MaxPermSize=${JIRA_MAX_PERM_SIZE} ${JAVA_OPTS}"
else
echo "PermGen switch is NOT supported and will NOT be set automatically."
fi
fi
Cause
The setenv.sh file have a script (permgen.sh) that check if a IBM VM is being used instead of a Sun VM.
If a "IBM" string is NOT found in $JAVA_HOME the parameter JAVA_PERMGEN_SUPPORTED is set to true, otherwise, is set to false preventing PermGen memory settings to be included in the JAVA_OPTS.
Workaround
Change the line:
1
JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${DISABLE_NOTIFICATIONS} ${JVM_SUPPORT_RECOMMENDED_ARGS}"
to:
1
JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} -XX:MaxPermSize=256m ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${DISABLE_NOTIFICATIONS} ${JVM_SUPPORT_RECOMMENDED_ARGS}"
Resolution
This problem is due to an incorrectly set JAVA_HOME directory. See Installing Java. The root cause is due to a bug in JIRA, addressed in JRA-21159.
Was this helpful?