java.lang.OutOfMemoryError: PermGen space

后端 未结 5 1446
星月不相逢
星月不相逢 2020-12-15 09:19

i\'m getting the following error \"http-9000-5\" java.lang.OutOfMemoryError: PermGen space

org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.serv

相关标签:
5条回答
  • 2020-12-15 09:35

    In addition to raising the PermGen size, try enabling permgen garbage collection with

    -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
    
    0 讨论(0)
  • 2020-12-15 09:41

    you need to set something in your tomcat argument

    JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 
    -server -Xms1536m -Xmx1536m
    -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m 
    -XX:MaxPermSize=256m -XX:+DisableExplicitGC"
    

    Note:XX:MaxPermSize=256m

    • Read more
    0 讨论(0)
  • 2020-12-15 09:44

    If you're using Tomcat as a Server of Eclipse, go to Server view, then double click on Tomcat, then "Open Launch Configuration", go to Arguments tab, and after setting -Dcatalina.base="" put this

    -Xms256m -Xmx512m -XX:MaxPermSize=512m -XX:PermSize=128m
    
    0 讨论(0)
  • 2020-12-15 09:54

    PermGen and heap size are different from each other.

    You need to increase permgen space like this:

    -XX:PermSize=256m 
    -XX:MaxPermSize=256m
    

    add this flags.

    Also look at this: explaining-java-lang-outofmemoryerror-permgen-space and this: how-to-deal-with-java-lang-outofmemoryerror-permgen-space-error

    Hope this helps.

    0 讨论(0)
  • 2020-12-15 09:56

    Try increasing the ram allocation for your JVM. It should help.

    Fix for eclipse: You can configure this in eclipse preference as follows

    Windows -> Preferences ( on mac its: eclipse ->preferences) Java -> Installed JREs Select the JRE and click on Edit on the default VM arguments field type in --Xms256m -Xmx512m -XX:MaxPermSize=512m -XX:PermSize=128m. (or your memory preference,for 1 gb of ram its 1024) Click on finish or OK.

    0 讨论(0)
提交回复
热议问题