11 Replies Latest reply on Oct 26, 2012 12:31 AM by Raghu T

    out of memory error occurs while redepolying.

    Raghu T Newbie

      Hi i am new to the jboss,help me how to solve this issue

       

      whenever i redeploying my project(more than once) it gives out of memory error ,after that i stop the server and again starts and then redepolying my project,it consumes a lot of time for me and  redepolying and server statrting  takes too much time.

       

      my memory settings in run.conf batch file

      JAVA_OPTS=-Xms128M -Xmx512M -XX:MaxPermSize=128M.

       

      Help me how to avoid this issue,and how to reduce the starting and redepolying time?

       

       

      Thanks,

      Raghu.

        • 1. Re: out of memory error occurs while redepolying.
          Wolf-Dieter Fink Master

          It will help us to help you if you provide more informations than that. (i.e. JBoss version, stacktrace)

           

          From what I can see you use 512M memory which sounds less, the GC might become in trouble during redeploy. Also the PermGenSize might be the issue.

          • 2. Re: out of memory error occurs while redepolying.
            Raghu T Newbie

            I am using jboss 6.1.0 and Stack trace:             

            java.lang.OutOfMemoryError: PermGen space

             


            at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) [:2.2.2.GA]
            at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) [:2.2.2.GA]
            at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) [:2.2.2.GA]
            at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) [:6.1.0.Final]
            at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138) [:0.2.2]
            at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:246) [:0.2.2]
            at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]
            at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]
            at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]
            at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]
            at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
            at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
            at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
            at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
            at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]
            at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
            at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_13]
            at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_13]
            at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_13]
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_13]
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) [:1.6.0_13]
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) [:1.6.0_13]
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_13]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_13]
            at java.lang.Thread.run(Thread.java:619) [:1.6.0_13]

            • 3. Re: out of memory error occurs while redepolying.
              Wolf-Dieter Fink Master

              In that case you might try '-XX:MaxPermSize=256M'.

              You can watch the PermGen via vconsole or jstat command-line tool (included in the java distribution)  i.e. 'jstat -gccause'

              • 4. Re: out of memory error occurs while redepolying.
                Raghu T Newbie

                ya it works Thanks for your suggestion.

                • 5. Re: out of memory error occurs while redepolying.
                  Raghu T Newbie

                  Hi Fink,

                   

                     The probelm is not solved again i am facing the issue. I was changed my PermGen space to 256 and 512 also but still not resolved.It is highly embarrssing me pls help me.

                   

                  java.lang.OutOfMemoryError: PermGen space

                   

                  vfs:///D:/server/jboss-6.1.0.Final/server/default/deploy/MozartCCNewUI.war -> java.lang.OutOfMemoryError: PermGen space

                   

                   

                   

                   

                            at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) [:2.2.2.GA]

                            at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) [:2.2.2.GA]

                            at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) [:2.2.2.GA]

                            at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) [:6.1.0.Final]

                            at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138) [:0.2.2]

                            at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:246) [:0.2.2]

                            at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]

                            at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]

                            at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]

                            at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]

                            at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]

                            at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]

                            at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]

                            at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]

                            at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]

                            at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]

                            at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]

                            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_13]

                            at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_13]

                            at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_13]

                            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_13]

                            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) [:1.6.0_13]

                            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) [:1.6.0_13]

                            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_13]

                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_13]

                            at java.lang.Thread.run(Thread.java:619) [:1.6.0_13]

                  • 6. Re: out of memory error occurs while redepolying.
                    Wolf-Dieter Fink Master

                    You should check the PermGenSpace (use jstat jconsole ...) if it is increasing after each deploy I suppose you have a bug in the application that unwanted references are stored or you may find a bug in AS6.

                     

                    If the PermGen is increased you can use a profiler (NetBeans JProfiler) or a simple heap dump to inspect the objects and with such information you should be able to find the owner of the reference.

                    • 7. Re: out of memory error occurs while redepolying.
                      Nikita Salnikov-Tarnovski Newbie

                      If you recieve java.lang.OutOfMemoryError: PermGen space on redeploys, that most propably means classloader leaks. In this case increasing PermSize will just delay the crash, not prevent it. You can read about this "pseudo-solution" here: http://plumbr.eu/blog/busting-permgen-myths . The only way to solve this problem is to find the cause of the memory leak and fix it. I can recommend Plumbr for this task.

                      • 8. Re: out of memory error occurs while redepolying.
                        erasmo2 marciano2 Master

                        I think that these values are lower

                         

                        JAVA_OPTS=-Xms128M -Xmx512M -XX:MaxPermSize=128M.

                         

                        TRY so

                         

                        JAVA_OPTS=-Xms1024M -Xmx1024M -XX:PermSize=316M -XX:MaxPermSize=512M.

                        • 9. Re: out of memory error occurs while redepolying.
                          Raghu T Newbie

                          i started jboss through run.batch file instead of in myeclipse ,after that i redepolyed my application.It is working fine.But i shutdown the server and then starts server in eclipse i tried again but it is giving out of memory error again...

                          • 10. Re: out of memory error occurs while redepolying.
                            Wolf-Dieter Fink Master

                            I suppose there should be settings for the server JVM in exlise as well

                            • 11. Re: out of memory error occurs while redepolying.
                              Raghu T Newbie

                              Can you pls tell me where i can find those settings in eclipse?