Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Java warning: "ignoring option MaxPermSize"

Moses Moore June 22, 2015

Every time JIRA restarts, I get this message on stderr:

"Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0"

How do I tell JIRA to stop using that option, so that I won't get this alert anymore?

 

2 answers

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 22, 2015

You should find it is set in setenv.sh / setenv.bat in the <JIRA install>/bin directory.  It's a harmless fault, but you can just edit it out of the setenv file to bin the warning.

Moses Moore June 22, 2015

Found it.  $JIRA/bin/setenv.sh

# 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=384m
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

 

Seems to be a fault in the bin/permgen.sh program, since that should've detected that Java would be upset if I asked for -XX:MaxPermSize. Reading bin/permgen.sh , it looks like all it does is check if I'm using the IBM-branded Java:

 

"${JAVA_LOCATION}"/bin/java -version 2&gt;&amp;1 | grep IBM
RT_CODE=$?
if [ ${RT_CODE} -eq 0 ]; then
    JAVA_PERMGEN_SUPPORTED=false
fi

 Maybe I should file a bug report?

Moses Moore June 22, 2015

This is the change I have in permgen.sh for now: if [ -x "${JAVA_LOCATION}"/bin/java ]; then JAVA_VERSION="$(${JAVA_LOCATION}/bin/java -version 2>&1)" if echo $JAVA_VERSION | grep IBM >/dev/null; then JAVA_PERMGEN_SUPPORTED=false # TODO: detect if java version is >= 1.8 not just == 1.8 elif echo $JAVA_VERSION | grep 'version "1.8' >/dev/null; then JAVA_PERMGEN_SUPPORTED=false fi fi

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 22, 2015

I like that, I'd file it as an improvement over at https://jira.atlassian.com/browse/JRA

0 votes
rrudnicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 22, 2015

MaxPermSize parameter in setenv.sh is obsolete since 6.3.3 ships with JRE 1.8.0_11.

 

Please take a look into this "bug":

https://jira.atlassian.com/browse/JRA-39580

 

Regards, 

Renato Rudnicki

Suggest an answer

Log in or Sign up to answer