I have a servlet (running inside Weblogic 5.1) that gives me an OutOfMemoryError when the number of transactions increases beyond a threshold (300 transactions for a Max Heap Size of 256MB, 1200 transactions for a Max Heap Size of 1024MB).
It seems that there is some object that keeps growing with each transaction. Is there some way to find what object(s) is/are growing as more and more transactions are made?
Any other suggestions on how to debug in this situation?
PS: I tried using HAT(http://java.sun.com/people/billf/heap/index.html) but got an IOException:
D:\hat\bin>java -cp hat.zip -mx100m hat.Main ../doc/dump.hprof
Started HTTP server on port 7000
Reading from ../doc/dump.hprof...
Dump file created Mon Mar 24 19:05:07 EST 2003
java.io.IOException: Stack trace not found for serial # 0
The two suggestions in the README for HAT are not viable (weblogic server exits abnormally on adding those options).
try using the profiler tools like OptimizeIt or JProbe
OptimizeIt integrates with WL well. Though they are not free softwares, you can have a evaluation copy to check if they are worth, and then go for buying it.
This will exactly show you how many objects are there of each type in the memory