1 Reply Latest reply on Mar 26, 2003 7:30 AM by 807546

    OutOfMemoryError in Servlet

    807546
      Hi folks,
      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?

      Warm regards,
      Musafir
      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
      at hat.parser.HprofReader.getStackTraceFromSerial(HprofReader.java:612)
      at hat.parser.HprofReader.readArray(HprofReader.java:778)
      at hat.parser.HprofReader.readHeapDump(HprofReader.java:437)
      at hat.parser.HprofReader.read(HprofReader.java:222)
      at hat.parser.Reader.readFile(Reader.java:91)
      at hat.Main.main(Main.java:135)

      The two suggestions in the README for HAT are not viable (weblogic server exits abnormally on adding those options).
        • 1. Re: OutOfMemoryError in Servlet
          807546
          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