9 Replies Latest reply on Nov 2, 2003 8:54 AM by Stanislav Borutsky

    OutOfMemoryErrors under load

    Stephen Gregg Newbie

      I have a fairly large application running under JBOSS 3.0.6. The app may run for a few hours, or just a few minutes, but almost always will throw an OutOfMemoryError.

      I have also tried JBOSS 3.2.1 and get exactly the same results.

      The application exhibits the same behaviour under Compaq's Tru64 JVM as under linux with Sun's JDK 1.4.1 & 1.4.2, Blackdown's JDK 1.4.1 and IBM's 1.4 JVM.

      The Linux box is a dual 2.8GHz machine with Red Hat Advanced server 2.1 with 2GB RAM.

      I have tried file persisted JMS, Hypersonic persisted JMS and oracle persisted JMS - this does not appear to be the problem.

      I have also increased the -Xmx to 1800m, but still no success, and I have played with -Xss up to 288k - again no success.

      The application makes many calls to EJBs - if I put one call in a loop (using JMS to drive the calls), the call will succeed hundreds of thousands of times - the same goes for each of the EJB methods called, so I no longer suspect the EJB code for a memory leak.

      On a separate JBOSS instance, the application also has a web front end (which also gets OutOfMemoryErrors) which when connections increase causes the problem to appear more frequently - decreasing the number of threads available for this does help a little, but this is only a bandaid for some real problem.

      I have monitored the current thread count, open file handles, freeMemory, etc, and see none of these limits even getting close to the max (or 0 in thge case of free memory), yet I still see the OutOfMemory error.

      Does anyone have any advise on how to further tackle this problem?