4 Replies Latest reply on May 14, 2003 7:31 AM by johan31be

    Memory problem

    johan31be

      Hello,

      I posted before my memory problem and the i recieved a lot hints to find what was going wrong.

      I downloaded jprofiler and attached tio jboss3.2.0 with java 1.4.1_02 on linux redhat 7.3
      with this great !!! tooling i sloved a few memory leaks (by setting some of my objects to null, so the gc cleaned them up)
      With jprofiler i could see that everything was cleanedup well after solving the problems.

      But strange when i was looking with top the java process is still growing.

      -> then i did a strip down of my server program to find the problem
      every strip down was negatif , the mem was going up.

      at the end only a simple servlet was left (see code below)

      if i run this simple servlet with a test program (jmeter -> 50 http request every 2 seconds) the memory goes up and never goes down.

      My session time-out is set to 1 minute.

      Any-one a idea whats left to solve the mem problem?
      Can it be log4j ?

      Johan

      ================= code ===================


      public class servlet extends HttpServlet {

      /** Initializes the servlet.
      */
      public void init(ServletConfig config) throws ServletException {
      super.init(config);
      }

      /** Destroys the servlet.
      */
      public void destroy() {
      }

      protected void octoRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, java.io.IOException {

      try{
      System.err.println("Servlet visitor");
      }
      catch(Exception e)
      {
      Syste.err.println("Exception happens");
      }
      }
      }

        • 1. Re: Memory problem

          Are you sure this isn't just garbage?

          If you stop the test and run the garbage collector
          does the memory reduce?

          Does jprofiler show a large number of objects
          not being released?

          You might try the IBM VM, they have a 1.4 release
          now, to see whether the same happens.

          Regards,
          Adrian

          • 2. Re: Memory problem
            johan31be

            ok

            i take some snapshots with jprofiler, in the attached zip file u can see the results.
            they are marked as _busy (while doing requests with jmeter)
            _after (after 10 minutes without requests)
            the file that are not marked are before the test (after jboss started)

            Where can i get the JVM of ibm ?

            Johan


            • 3. Re: Memory problem
              johan31be

              stil not solved,

              I downloaded Java IBM , shit happens again, my jni inreface doesn't work anymore even after recompling.
              So i can not test it if is better with the IBM JVM.

              Is there problem with GC under linux with JVM1.4.1 ??

              Johan

              • 4. FOUND MEM PROBLEM
                johan31be

                We changed or linux from Redhat 7.3 to slackware an guess what !!! There was no memory problem any more.

                Johan