Increasing Permanent Generation Memory Does Not Work

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Changing JIRA_MAX_PERM_SIZE parameter in setenv.sh file does not have any effect on Permanent Generation Memory available in JIRA.

# 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

原因

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.

回避策

Change the line:

JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${DISABLE_NOTIFICATIONS} ${JVM_SUPPORT_RECOMMENDED_ARGS}"

to:

JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} -XX:MaxPermSize=256m ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${DISABLE_NOTIFICATIONS} ${JVM_SUPPORT_RECOMMENDED_ARGS}"

ソリューション

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.

最終更新日 2022 年 9 月 5 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.