4 Replies Latest reply on Dec 20, 2006 12:30 PM by Max Rydahl Andersen

    Memory Leak in JBoss IDE?

    jantzen Newbie

      Eclipse 3.2.1
      JBoss IDE 2.0 beta2 plugin
      Sun Java 1.5.0_08 (64 bit)
      Debian

      I've been seeing tremendous instability in Eclipse ever since migrating from JBossIDE 1.6 to the 2.0 beta. In particular, operations like hibernate code generation and reverse engineering routinely result in crashes. Controlling the JBoss server is enough to do it though.

      Often there's an out of memory dialog that pops up, mostly it just freezes entirely and I have to kill -9 the process. I've tried bumping up the memory but even with 3/4 Gig of memory it happens.

      My co-oworker with the same setup on 32 bit Java on OSX sees the same behavior, so it's not the underlying VM implementation that's responsible. And doing non-JBossy things I can keep the Eclipse session going far longer.

      Anybody else seeing these sorts of problems? I've resorted to opening the necessary files for a given task and then intentionally shutting down Eclipse so that my workbench will be in proper shape after the inevitable crash :)

        • 1. Re: Memory Leak in JBoss IDE?
          Max Rydahl Andersen Master

          I run with the (hibernate) tooling every day and it does not run out of memory.......how many times to you run the codegeneration ?

          Btw. it is probably the permgen space you need to increase because hibernate generates proxy classes.

          • 2. Re: Memory Leak in JBoss IDE?
            jantzen Newbie

            Hmm, PermGen space ... Looking at my workspace/.metadata/.log file I see:

            !ENTRY org.eclipse.core.jobs 4 2 2006-12-18 18:48:46.390
            !MESSAGE An internal error occurred during: "EL Syntax Validator".
            !STACK 0
            java.lang.OutOfMemoryError: PermGen space
            
            !ENTRY org.eclipse.core.jobs 4 2 2006-12-18 18:48:54.973
            !MESSAGE An internal error occurred during: "JSP Directive Validator".
            !STACK 0
            java.lang.OutOfMemoryError: PermGen space
            
            !ENTRY org.eclipse.core.jobs 4 2 2006-12-18 18:49:03.967
            !MESSAGE An internal error occurred during: "Process resource updates".
            !STACK 0
            java.lang.OutOfMemoryError: PermGen space
            


            I'm adding
            -XX:MaxPermSize=256m
            to my eclipse.ini file to see if it improves things. Thanks for the suggestion.

            • 3. Re: Memory Leak in JBoss IDE?
              Alex Grönholm Novice

              I've been having the same kind of problems. Eclipse used to crash once every 10 minutes or so. I then updated Eclipse and disabled one of the major plugins I was using, and that seemed to help somewhat (crashes have been reduced to a handful in a day). I'll try that setting too, and see if I can reduce crashes to zero.
              What is this PermGen thing anyway? I hadn't even heard about it until I read the workspace log to see what caused the hang/crash.

              • 4. Re: Memory Leak in JBoss IDE?
                Max Rydahl Andersen Master

                PermGen space is where the byte code for classes/method and interned Strings are located.

                Thus for applications that dynamically generates classes, such as hibernate tools each time you start a sessionfactory, you might need some more permgen space.