1 2 3 Previous Next 35 Replies Latest reply on Jan 11, 2013 2:49 PM by apparaonali Go to original post
      • 30. Re: Jboss7 memory leak - class org.xnio.LimitedBlockingQueue @ 0x45d48b78
        smarlow

        The -server option is processed by Java and chooses the server jvm. 

         

        Some info on choosing between -client and -server is here.  Like I said before, you can find a lot of information posted on the internet about the client hotspot jvm and the server hotspot jvm.  Here is some more info.

         

        Can you show us the exception call stack from the out of memory error (should still be in your as7\standalone\log\server.log file from when you started with -client).

         

        Also, if you are seeing "OutOfMemoryError: GC overhead limit exceeded", that is not a real out of memory error.  You didn't mention seeing this error, so I assume your not hitting it.  If you were, adding command line option -XX:-UseGCOverheadLimit would help (disables checking of how often the garbage collector runs).

        • 31. Re: Jboss7 memory leak - class org.xnio.LimitedBlockingQueue @ 0x45d48b78
          apparaonali

          Thanks for your comments and suugestions.

           

          I ran our test with options "-XX:-UseGCOverheadLimit" and here are my observations.

          All the experiments are on widnows7.

          • Jboss start with "-client" option - default on Windows
            • It takes around 550MB for starting the Jboss and deployment of all our applications.
            • For completion of our endurance test it takes 4 hours.
            • After start running the test, in few minutes Jboss JVM memory is reaching to 1GB.
            • This time I didn't observe any OutOfMemoryError, However I observed some times.
          • Jboss start with "-server" option
            • It takes around 750MB for starting the Jboss and deployment of all our applications.
            • For completion of our endurance test it takes 1 hour 22 minutes.
            • After start running the test, after 30 minutes Jboss JVM memory is reaching to 950MB.
            • This time I didn't observe any OutOfMemoryError.

           

          I looked at the Java hotspot options and based on that

          On Linux by default it starts "-server" option,

          However on widnows if the machine is "server class"(Means minimum 2 CPUs and 2 GB RAM) then it starts with "-server" else it starts with "-client".

           

          Thanks for the above links for JVM hotspot options,

          I looked at the options and looks like "-server" option is better.

          • 32. Re: Jboss7 memory leak - class org.xnio.LimitedBlockingQueue @ 0x45d48b78
            apparaonali

            I ran the tests for couple of hours (3 hours) with "-server" option then memory is reaching to 1.2GB and it is not coming back to normal.

            Looks like with "-server" option doesn't resolve the issue.

            • 33. Re: Jboss7 memory leak - class org.xnio.LimitedBlockingQueue @ 0x45d48b78
              apparaonali

              We found a reason for the memory leak.

              We added entity listers to clear Jboss Security cache every time we update users, groups and roles for having new roles groups to existing users.

              When I commented the listeners I am not observing the memory leak.

              Here is the code jboss security context clearing code, I don't know what is the issue in the code.

               

              public static void reloadSecCtx() {

                      try {

                      private static final String OUTCOME = "outcome";

                      private static final String SUCCESS = "success";

                          final ModelControllerClient client = ModelControllerClient.Factory.create("localhost", 9999);

                          try {

                              final ModelNode address = new ModelNode();

                              address.add("subsystem", "security");

                              address.add("security-domain", "SecDomain");

               

                              final ModelNode operation = new ModelNode();

                              operation.get("operation").set("flush-cache");

                              operation.get("address").set(address);

               

                              final ModelNode result = client.execute(operation);

               

                              if (!SUCCESS.equals(result.get(OUTCOME).asString())) {

                                  //Throws some internal application specific exception

                              }

                          }

                          catch (Throwable e) {

                              log.error("Could not refresh security context with informaction about users and roles." + e.getMessage());

                          }

                          finally {

                              if (client != null) {

                                  client.close();

                              }

                          }

                      }

                      catch (Throwable e) {

                          log.error("Could not refresh security context with informaction about users and roles." + e.getMessage());

                      }

                  }

              • 34. Re: Jboss7 memory leak - class org.xnio.LimitedBlockingQueue @ 0x45d48b78
                smarlow

                Have you tried to recreate the above in the standalone example? 

                 

                You can also attach the EclipseMemoryAnalyzer to the running application server and press the "Run Garbage Collector" button prior to looking at memory in use (after running your test for a few hours).  Its only meaningful to look at the "memory in use", after a full garbage collector run has been started.  Maybe your already familar with this or maybe not. 

                 

                If you are seeing an "out of memory" exception, show us the full exception call stack that you get.

                • 35. Re: Jboss7 memory leak - class org.xnio.LimitedBlockingQueue @ 0x45d48b78
                  apparaonali

                  Thanks Scott for your comments.

                   

                  Scott>>Have you tried to recreate the above in the standalone example?

                  APPU>>I haven't created any sample application. I will create a sample application and try to reproduce the issue.

                   

                  Scott>> You can also attach the EclipseMemoryAnalyzer to the running application server and press the "Run Garbage Collector" button prior to looking at memory in use (after running your test for a few hours).  Its only meaningful to look at the "memory in use", after a full garbage collector run has been started.  Maybe your already familar with this or maybe not.

                  APPU>>I analyzed the memory using Eclipse MAT after and before running the gargabe collctor and I didn't see any differences except Finalizer references.

                   

                  Scott>>If you are seeing an "out of memory" exception, show us the full exception call stack that you get.

                  We are having some issue in our application, it runs for 7 hours and then getting some issue henec I am not able to provide the full stack for OutOfMemoryError issue.

                  We are working the fix for this and will try to reproduce the issue.

                  1 2 3 Previous Next