This discussion is archived
1 2 Previous Next 19 Replies Latest reply: Jan 20, 2011 12:16 AM by 739896 RSS

PermGen space Error Weblogic 10.3

677323 Newbie
Currently Being Moderated
Hello,

I am working with Weblogic 10.3. I created a custom domain and inside thim i created a new server and machine. I am trying to do deployment a standard EMC web application (Documentum Webtop) and I get this error "java.lang.OutOfMemoryError: PermGen space". I modified this parameters in my enviroment at this config files because i use Node Manager:

     1. %DOMAIN_HOME%\bin\setDomainEnv.cmd
     
          @REM set MEM_ARGS=-Xms256m -Xmx512m
          set MEM_ARGS=-Xms1024m -Xmx1024m
          
          @REM set MEM_MAX_PERM_SIZE=-XX:MaxPermSize=128m
          set MEM_MAX_PERM_SIZE=-XX:MaxPermSize=256m
          
     After this change, i get de same error.
     
     2. %WL_HOME%\common\bin\commEnv.cmd
     
     @rem set MEM_ARGS=-Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning
     set MEM_ARGS=-Xms32m -Xmx200m -XX:MaxPermSize=256m -XX:+UseSpinning
     
     After this change, i get de same error too.
     
     
     Could anybody tell me what is wrong and what script should I change?

Thanks in advance.
  • 1. Re: PermGen space Error Weblogic 10.3
    739896 Guru
    Currently Being Moderated
    Hi JaFran,

    http://middlewaremagic.com/weblogic/?p=4464
    How are u starting your Server using NodeManager or using StartScript? I think that the changes are not being picked up by your Managed Server...Have u confirmed it by looking at the managed Server Logs or STDOUT ...what was the Heap & PerSize there while starting in STDOUT.?


    If you are starting your Managed Server using NodeManager then First of all try the following options as well..

    Option-1).
    Login to AdminConsole-->Environments---.Servers--->YourManagedServer--->Configuration (TAB)--->ServerStart (SubTab)---> Arguments:(TextArea) -Xms1024m -Xmx1024m -XX:MaxPermSize=256m

    Specify the Heap & MaxPermSize setting here.. in the TextArea ...Then start your Server.


    If option-1 doesn't work then....
    Option-2). If above also didn't work then please try to add the following 2 entry in the "nodemanager.properties" file and in startWebLogic.cmd please add the JAVA_OPTION=-Xms1024m -Xmx1024m -XX:MaxPermSize=256m

    StartScriptName=startWebLogic.sh
    StartScriptEnabled=true

    Then try to start your Managed Server.




    Thanks
    Jay SenSharma
    http://middlewaremagic.com/weblogic/?p=4464 (Middleware magic Is Here)*
  • 2. Re: PermGen space Error Weblogic 10.3
    677323 Newbie
    Currently Being Moderated
    Hi Jay,

    I choose the option 1 and work fine. This is my start secuence:

    1. Start node manager script (starNodeManager.cmd).
    2. Start admin server for my domain (startWeblogic.cmd).
    3. Open admin server console and add this arguments.
    4. Start my custom server using admin server console.

    Thanks for your quickly help.
  • 3. Re: PermGen space Error Weblogic 10.3
    739896 Guru
    Currently Being Moderated
    Great
  • 4. Re: PermGen space Error Weblogic 10.3
    758123 Newbie
    Currently Being Moderated
    Hi,
    We are using weblogic 10.3. After deplyoing our applications in production we are getting java: out of memory Permgen space error in production server. We changed MEM_ARGS in setDomainEnv.sh.

    MEM_ARGS="-Xms1024m -Xmx1024m"
    export MEM_ARGS

    MEM_PERM_SIZE="-XX:PermSize=48m"
    export MEM_PERM_SIZE

    MEM_MAX_PERM_SIZE="-XX:MaxPermSize=128m"
    export MEM_MAX_PERM_SIZE


    But we are still getting the same error. Can you please suggest what else we need to change? Should we change commEnv.sh also? This is really very urgent.

    Thanks,
    Mitali

    Edited by: user12070898 on Mar 4, 2010 11:37 PM
  • 5. Re: PermGen space Error Weblogic 10.3
    739896 Guru
    Currently Being Moderated
    Hi Mitali,

    In many production scenario i have seen that we should set the MaxPermSize at least 256M.

    Second thing We need to look at the Server Stdout/Server log first few line that whatever values we are setting for PermSize is getting reflected there or not...many cases whatever changes we made in our startScripts are not in appropriate place so they are not reflected.

    Are you starting your Server Using AdminConsole...means with the Help of NodeManager...?
    Or Are u starting your Servers using script like "startManagedWebLogic.sh" ?


    Thanks
    Jay SenSharma
    http://middlewaremagic.com/weblogic/?p=4464 (Middleware magic Is Here)*
  • 6. Re: PermGen space Error Weblogic 10.3
    758123 Newbie
    Currently Being Moderated
    Thank you so much for your quick reply. I have changed setDomainEnv.cmd again. And New values are

    MEM_ARGS="-Xms1024m -Xmx1024m"
    export MEM_ARGS

    MEM_PERM_SIZE="-XX:PermSize=48m"
    export MEM_PERM_SIZE

    MEM_MAX_PERM_SIZE="-XX:MaxPermSize=256m"
    export MEM_MAX_PERM_SIZE

    When I start the server through ./startWebLogic.sh I can see-

    starting weblogic with Java version:
    java version "1.6.0_18"
    Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
    Java HotSpot(TM) Server VM (build 16.0-b13, mixed mode)
    Starting WLS with line:
    /usr/jdk/instances/jdk1.6.0/bin/java -server -Xms1024m -Xmx1024m -XX:MaxPermS ize=256m -XX:MaxPermSize=160m -da -Dplatform.home=/export/home/eaiapppr/bea_ho me/wlserver_10.3 -Dwls.home=/export/home/eaiapppr/bea_home/wlserver_10.3/server -Dweblogic.home=/export/home/eaiapppr/bea_home/wlserver_10.3/server -Dweblogic .management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwl w.logErrorsToConsole=true -Dweblogic.ext.dirs=/export/home/eaiapppr/bea_home/pat ch_wlw1030/profiles/default/sysext_manifest_classpath:/export/home/eaiapppr/bea_ home/patch_wls1030/profiles/default/sysext_manifest_classpath:/export/home/eaiap ppr/bea_home/patch_cie670/profiles/default/sysext_manifest_classpath:/export/hom e/eaiapppr/bea_home/patch_alsb1031/profiles/default/sysext_manifest_classpath -D weblogic.Name=AdminServer-8001 -Djava.security.policy=/export/home/eaiapppr/bea_ home/wlserver_10.3/server/lib/weblogic.policy weblogic.Server


    We usually encounter the out of memory error while we deploy 2-3 applications (containing sbconfig.jars and webservices) or navigate rapidly on admin console.

    Do we need to change commEnv.sh file? Please help.

    Regards,
    Mitali
  • 7. Re: PermGen space Error Weblogic 10.3
    677323 Newbie
    Currently Being Moderated
    Hi Mitali,

    I did my installation on Windows Server and i used node manager. I modify setDomainEnv.cmd and commEnv.cmd but this changes doesnt i solved my problem restore the original files (setDomainEnv.cmd, commEnv.cmd) and i used administration console to increase this parameters values in my custom server. At the correct post, jay indicate 2 options to solved the problem and i follow the first one and my enviroment work fine.
  • 8. Re: PermGen space Error Weblogic 10.3
    758123 Newbie
    Currently Being Moderated
    Hi,
    I am not using node manager or managed server. I am starting admin server with startWebLogic.sh. So, do I need to follow the same process as you did?
  • 9. Re: PermGen space Error Weblogic 10.3
    739896 Guru
    Currently Being Moderated
    In default "startWebLogic.sh" you will find the following lines...
    Hi,

    I can see that there are two MaxPermSize entries in your Server Output:
    -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -XX:MaxPermSize=160m

    Note: the second option value is always the final value which is accepted by the JVM, it means JVM is taking MaxPerSize as 160m which may be less...

    ---------------*** below are the few lines froml default startWebLogic.sh ***-----------------
    # Call setDomainEnv here.
    DOMAIN_HOME="C:/bea103/user_projects/domains/7001_Domain"
    . ${DOMAIN_HOME}/bin/setDomainEnv.sh $*

    SAVE_JAVA_OPTIONS="${JAVA_OPTIONS}"
    --------------------------------------------------------------------


    please edit the above JAVA_OPTION as:
    -----------------------------------------*** CHANGED startWebLogic.sh lines below ***-------------------------
    # Call setDomainEnv here.
    DOMAIN_HOME="C:/bea103/user_projects/domains/7001_Domain"
    . ${DOMAIN_HOME}/bin/setDomainEnv.sh $*

    *SAVE_JAVA_OPTIONS="${JAVA_OPTIONS}" -Xms1024m -Xmx1024m -XX:MaxPermS ize=256m*
    ---------------------------------------------------------------------



    *Note:* No need to specify any thing in "setDomainEnv.sh" else it will be applied for all the Servers available in your Domain.

    *Note:* No need to specify any thing in "commEnv.sh" else it will be applied for all the all Domains.


    Thanks
    Jay SenSharma
    *http://middlewaremagic.com/weblogic/?p=4464* (Middleware amgic Is Here)*
  • 10. Re: PermGen space Error Weblogic 10.3
    758123 Newbie
    Currently Being Moderated
    Thanks Jay. We have changed startWebLogic.sh the way you suggested. But the change is not reflecting when we start the server.

    We can see the same set of lines when we start the server-

    Starting WLS with line:
    /usr/jdk/instances/jdk1.6.0/bin/java -server -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -XX:MaxPermSize=160m -Dweblogic.Name=AdminServer-8001 -Djava.security.policy=/export/home/eaiapppr/bea_home/wlserver_10.3/server/lib/weblogic.policy weblogic.Server
    <Mar 5, 2010 4:40:39 PM IST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Server VM Version 16.0-b13 from Sun Microsystems Inc.>


    As of now we are retaining the changes within setDomainEnv.sh, as we have only Admin server within that domain.In setDomainEnv.sh there is a line which is setting maxPermSize as 160m.

    MEM_ARGS="-Xms1024m -Xmx1024m"
    export MEM_ARGS

    MEM_PERM_SIZE="-XX:PermSize=48m"
    export MEM_PERM_SIZE

    MEM_MAX_PERM_SIZE="-XX:MaxPermSize=256m"
    export MEM_MAX_PERM_SIZE

    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
    if [ "${PRODUCTION_MODE}" = "" ] ; then
    MEM_DEV_ARGS="-XX:CompileThreshold=8000 ${MEM_PERM_SIZE} "
    export MEM_DEV_ARGS
    fi
    fi

    # Had to have a separate test here BECAUSE of immediate variable expansion on windows

    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
    MEM_ARGS="${MEM_ARGS} ${MEM_DEV_ARGS} ${MEM_MAX_PERM_SIZE}"
    export MEM_ARGS
    fi

    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
    MEM_ARGS="${MEM_ARGS} -XX:MaxPermSize=160m"
    export MEM_ARGS
    fi

    Is there any other way we can confirm that the server is accepting the configuration what we set in startWebLogic.sh? Please let us know.
  • 11. Re: PermGen space Error Weblogic 10.3
    739896 Guru
    Currently Being Moderated
    Can you just find out in which file you have set -XX:MaxPermSize=160m

    commEnv.sh
    setDomainEnv.sh
    startWebLogic.sh

    That will really help....because startWebLogic.sh ----calls--->setDomainEnv.sh-----calls---->commEnv.sh
    So somewhere the value is get overridden.

    Just do a GREP on 160 word.
  • 12. Re: PermGen space Error Weblogic 10.3
    758123 Newbie
    Currently Being Moderated
    Hi,
    In setDomainEnv.sh there is a code snippet.

    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
    MEM_ARGS="${MEM_ARGS} ${MEM_DEV_ARGS} ${MEM_MAX_PERM_SIZE}"
    export MEM_ARGS
    fi

    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
    MEM_ARGS="${MEM_ARGS} -XX:MaxPermSize=160m"
    export MEM_ARGS
    fi

    I think from here it is getting 160m.
  • 13. Re: PermGen space Error Weblogic 10.3
    739896 Guru
    Currently Being Moderated
    Just remove it (-XX:MaxPermSize=160m) from setDomainEnv.sh and set

    -XX:MaxPermSize=256m only in *"startWebLogic.sh"*
  • 14. Re: PermGen space Error Weblogic 10.3
    758123 Newbie
    Currently Being Moderated
    So the if clause will be like this in setDomainEnv.sh?

    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
    MEM_ARGS="${MEM_ARGS} ${MEM_DEV_ARGS} ${MEM_MAX_PERM_SIZE}"
    export MEM_ARGS
    fi

    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
    MEM_ARGS="${MEM_ARGS}"
    export MEM_ARGS
    fi
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points