3 Replies Latest reply on Dec 30, 2008 5:40 PM by peterj

    JAVA_OPTS in run.conf

    mduffy_lists

      Creating the optimal settings for garbage collection and JVM tuning can be over whelming:

      http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html

      http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp

      We are running JBoss on new Dell servers with 2Gb of memory and we are getting out of memory errors with just moderate usage.

      Our current settings are:

      JAVA_OPTS="-Xms512m -Xmx1024m -XX:MaxPermSize=256m -XX:-UseGCOverheadLimit -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"


      Any suggestions?

      Thx.

      Mike

        • 1. Re: JAVA_OPTS in run.conf
          peterj

          What out of memory exceptions? Out of heap memory? Out of permgen space? Out of system resources/memory? Each is dealt with in a different way. Please post the exact exception.

          • 2. Re: JAVA_OPTS in run.conf
            mduffy_lists

             

            javax.servlet.ServletException: Servlet execution threw an exception
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
             at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
             at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
             at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
             at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
             at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
             at java.lang.Thread.run(Thread.java:619)
            Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded


            We added -XX:-UseGCOverheadLimit to the JAVA_OPTS but I am not sure that is the optimal solution.

            Mike


            • 3. Re: JAVA_OPTS in run.conf
              peterj

              According to http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html#par_gc.oom, it would appear that you are running too many collections and each collection is not freeing enough heap space. Have you collected GC data and graphed it to see what is happening? See my presentation on that subject for information:

              http://www.cecmg.de/doc/tagung_2007/agenda07/24-mai/2b3-peter-johnson/index.html

              Also, I assume you are using JDK 6, if that is not correct, please let me know.