zoukankan      html  css  js  c++  java
  • jetty 9.2 + java.lang.OutOfMemoryError: PermGen space 解决办法

    
    

    我这边的异常发生情况是生产环境   环境是 jetty 9.2   jdk7,

    
    

    百度了很久没找到解决办法,搜到的倒是不少,不过都没什么鸟用,在Google翻到了,搬运一下。





    java.lang.OutOfMemoryError: PermGen space
    2018-03-08 18:06:58.428:WARN:oejs.HttpChannel:qtp1967670511-19: /wxapp/wxUser/order?code=011Q7slk2vtYzG08uRnk2vhllk2Q7slf&state=1 javax.servlet.ServletException: org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.OutOfMemoryError: PermGen space at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:130) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745)

     搬运工------------------------------》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》

    In Jetty 9.2+
    
    In your ${jetty.base} directory, add the jvm module + default configuration
    
    [user]$ cd mybase
    [mybase]$ java -jar /path/to/jetty-distribution/start.jar --add-to-start=jvm
    INFO: jvm             initialised in ${jetty.base}/start.ini (appended)
    [mybase]$ 
    Now go edit your ${jetty.base}/start.ini and configure the properties, uncomment those things that you want (don't forge to uncomment --exec) jetty to use when starting itself up.
    
    Example:
    
    # --------------------------------------- 
    # Module: jvm
    --module=jvm
    ## JVM Configuration
    ## If JVM args are include in an ini file then --exec is needed
    ## to start a new JVM from start.jar with the extra args.
    ##
    ## If you wish to avoid an extra JVM running, place JVM args
    ## on the normal command line and do not use --exec
    --exec
    -Xmx1024m
    -Xmn512m
    -XX:MaxPermSize=128m
    # -XX:+UseConcMarkSweepGC
    # -XX:ParallelCMSThreads=2
    # -XX:+CMSClassUnloadingEnabled
    # -XX:+UseCMSCompactAtFullCollection
    # -XX:CMSInitiatingOccupancyFraction=80
    # -verbose:gc
    # -XX:+PrintGCDateStamps
    # -XX:+PrintGCTimeStamps
    # -XX:+PrintGCDetails
    # -XX:+PrintTenuringDistribution
    # -XX:+PrintCommandLineFlags
    # -XX:+DisableExplicitGC
    # -Dorg.apache.jasper.compiler.disablejsr199=true
  • 相关阅读:
    C#中String和string的区别
    .NET设计模式系列文章
    [python] 视频008
    [python]获取字符串类型
    【影评-转自豆瓣】疯狂原始人
    [python]文本处理1.2
    周末可以做的10件事
    [python]随机数
    [python] 字符串引用
    用户控件(.ascx)与<ul><li>以及<a>布局之小结
  • 原文地址:https://www.cnblogs.com/lewskay/p/8530137.html
Copyright © 2011-2022 走看看