Employ jmemprof or Jprobe to profile your memory use. You might be able to use optimizeit to a more limited degree. See the performance thread on memory study. You can also do the simple thing like verbose:gc to get an idea of a general area of memory use. Is it possible that you are getting a JDBC related memory leak or breakage?
I have seen this problem before. This is what is going on: The number of threads a JVM can create goes down as you increase the stack size (-mx1800m). The way I solved my problem was to balance the number of threads I need for my app and the memory needed to run my application.
Also IBM's JVM handles these issues very nicely on Linux.
Agreed. Some of the issues that people raise here I have never experienced on a production Linux boxen but we exclusively use the IBM JDK.
Thanks for the input - I have changed to using the IBM JDK1.4, and have put our code through the jmemprof profiler - this has pointed out some weaknesses in our code, and potentially in the oracle OCI drivers - that's tomorrows task.
Thanks Again for the input - I think I'll solve this using IBM and fixing our code,
Oracle OCI drivers.
Memory leaks in native code, not visible in the normal information available from the JVM.
First try the thin drivers. This cured similar problems for us.
I haven't noticed any problems with the OCI driver. We have an app running in production for over a year now with no problems related to Oracle's OCI driver.
It might be related to caching issues.
Entity beans are created and then cached for a specific amount of time. The standardjboss.xml holds a threshold entry which specifies how long entities are cached by the container, if you lower this value it will definitely decrease memory usage as beans are deactivated earlier.
We had such an issue as we are importing and distributing lots of measurement data where the beans are created once but not needed any more afterwards.
Increasing the threshold also increases the overall memory level while decreasing it lowers memory consumption. This also increases performance btw.
We had the same problem and it was caused by memory leaks in the OCI driver. Switching to the thin driver solved the problem.
Never use OCI drivers, use only thin driver or 3rd party drivers. This solved problems in many projects I was involved in.