3 Replies Latest reply on Jan 28, 2005 9:51 PM by Elias Ross

    Server memory problems

    akaltenpoth Newbie

      we have a severe memory problem running a CMP application on JBoss 3.2.5, Container Config Standard CMP 2.x EntityBean, Commit Option A, OS = Win.

      After running fine for some hours the JVM (or JBoss?) has used up all memory. We receive different kinds of strange errors like
      Unable to passivate due to ctx lock, id=...
      and finally
      The server then is so slow and unreliable it only can be restarted.

      Our main use case is: upload a zip file from client to server, unpack it, parse a single xml file that contains a lot of 'meta data' and put this resulting data in a value object (one object containing a hierarchy of several layers of subobjects).
      This value object is then sent via Message Driven Bean to a stateless session bean to write the data into a Oracle9 database.
      After running this process for maybe several hundred times the server goes down.
      In the task manager of our server (Windows Server 2003 with 2GB, Java 1.4.2) you can watch the increase of used memory over time until the maximum available for the JVM is reached (right now 1.2GB) and the errors begin to occur.

      We already tried different settings for cache, max VM memory and else, sometimes with slightly better behaviour, but the basic problem remains that the memory gets lost. We used the JProbe profiler to locate any memory leaks, but without much success so far. After suspecting first badly written code, then bad configuration, now it almost looks like a much more basic problem?

      Does anyone have an idea, or maybe even had a similar problem?
      Help would be much appreciated.

        • 1. Re: Server memory problems
          akaltenpoth Newbie

          Just in case somebody is interested:
          After very tedious months of struggling with a (productive!) server that needed restarting at least once a day, we finally have found the problem:
          For performance improvement we had wanted to disable the MetricsInterceptor, so in standardjboss.xml we set set the flag

          <interceptor metricsEnabled="false">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>

          The result was thousands of unused messages accumulating in our entity beans that never got garbage collected.
          After setting the flag to true suddenly the server was running fine!
          Now we have simply commented out the whole line, so that the MetricsInterceptor really doesn't interfere. Seems to work ok.
          Could this be a JBoss bug?

          • 2. Re: Server memory problems
            mcarabias Newbie

            I have this parameter by default in true.

            <interceptor metricsEnabled="false">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>

            If i comment this line, would i have a better performance if i comment the line? What does this param mean?

            thanks a lot


            • 3. Re: Server memory problems
              Elias Ross Master

              It's hard to say what's related or not. Seems like a red herring.

              Use jboss-profiler (or some other profiling tool) to take a look at what objects were created (and kept live) by your server.