1 Reply Latest reply on Feb 13, 2013 2:41 PM by peterj

    maxim number of wars per jboss instance and pergem settings

    adadaddadada

      Hi,

         We are using Jboss AS 5.1 where every instance has 12 wars but getting "java.lang.OutOfMemoryError: PermGen space". errors sporadically,which may result from GC activities.

       

      To resolve the issues, we have the following questions:

      1. What's the maximum number of web applications(wars) one jboss instance can support?
      2. any recommendation for pergem size settings to support multiple apps,current setting is -XX:MaxPermSize=256m.  It sounds like modern JVM provides more options such as -XX:+CMSClassUnloadingEnabled, should the setting be helpful?

      for example something like this?

      -XX:PermSize=512m -XX:MaxPermSize=1024 -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled

      any suggestions will be greatly appreciated

      Thanks

      -Vic

       

      Here is the JVM and JAVA OPTs settings:

      JVM version:  1.60_24 Hotspot 64-bit server

      JAVA_OPTS:

      -Dprogram.name=startServer.sh -server -javaagent:/opt/wily/8.2.3/Agent.jar -Dcom.wily.introscope.agentProfile=/opt/wily/8.2.3/IntroscopeAgent.profile -Dcom.wily.introscope.agent.agentName=appserver_cm1 -Dub.jvmroute.node=node1 -Dub.deployScanEnable=false -Dub.ajp.maxThreads=150 -Dub.ajp.minSpareThreads=25 -Dub.ajp.maxSpareThreads=25 -Dub.ajp.acceptCount=100 -Dub.ajp.connectionTimeout=600000 -Djboss.messaging.ServerPeerID=1 -Djboss.default.jgroups.stack=ub_tcp -Djboss.jgroups.tcp.tcp_port=7600 -Djboss.jgroups.tcp.tcpping.initial_hosts=10.151.220.49[7600],10.151.200.37[7600] -Dub.db.connectString=jdbc:oracle:thin:@server:port:tnsName -Dub.oracle.db.user= -Dub.oracle.db.pass= -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true -Djava.net.preferIPv4Stack=true -Djava.library.path=/opt/jboss-5.1.0.GA/native/lib64::/ora01/oracle/product/11.1.0/lib

        • 1. Re: maxim number of wars per jboss instance and pergem settings
          peterj

          This sounds very much like thise recent dicussion:

          https://community.jboss.org/message/797449#797449

           

          1) How big are your applications? How much memory have you got? If they are really small, you can probably deploy thousands.  If the applicaiton is really huge (10s to 100s of thousands of classes) and maintains large amounts of state and services millions of user,s then you can deploy only 1.

           

          2) Based on the JAVAoPTS echoed, max permgen is set to 256M, increase it. You can try 1024M, the JVM will use only as much permgen space as required. Though you might want to monitor actual usage and reduce the maxpermgen accordingly. For example, if you use only 480M of maxpermgen, then set it to 500M or 512M.