2 Replies Latest reply on Sep 26, 2007 5:45 PM by brintoul

    java.lang.OutOfMemoryError: PermGen space

    Kosta Kontos Newbie

      Hi

      While monitoring JBoss's console output, I have noticed countless different errors, all with the following cause

      java.lang.OutOfMemoryError: PermGen space


      Some of the errors include:
      - ERROR [ContainerBase] Exception invoking periodic operation: ...
      - ERROR [[/portal-weather-samples]] Session event listener threw exception
      - ERROR [MessageCache] Message Cache Thread Stopped: ...
      - ERROR [CommandServlet] Exception in command invocation ...

      ... and many more.

      I am running JBoss AS 4.2.1 on Ubuntu Linux 7.04.

      It is also worth noting that I have only starting getting this PermGen space problem after having installed the JBoss Forums portlet and leaving it up for around a day. The errors started long after everything deployed ok. We even wrote some posts on the forum with no errors.

      I am using JBoss Portal 2.6.1 and JBoss Forums 1.0.0.GA.P2.6.1

      Any help would be appreciated. I hope this isn't a major issue and that it is easily solveable.

      Cheers,



        • 1. Re: java.lang.OutOfMemoryError: PermGen space
          Kosta Kontos Newbie

          Hi

          Since I posted this, I have done some research. Our server has 1gb of ram. I am now using the following JVM options:

          -XX:MaxPermSize=128m -Xmx512m


          The defaults were 64mb for both.

          So far things seem to be running smoothly. I am keeping an eye on memory usage with 'top'.

          Question: is a gig of ram enough? Take into consideration that we are using JBoss AS 4.2.1, JBoss Portal 2.6.1, and JBoss Forums and Wiki portlets.

          We plan on having around 200 to 1000 users.

          How much memory should we be looking at for our needs? Any other scalability issues I should keep in mind?

          Cheers,

          • 2. Re: java.lang.OutOfMemoryError: PermGen space
            brintoul Newbie


            I, too, have run into this problem. As it turned out, we were distributing our Oracle JDBC driver .jar with the web application and when we removed it and placed it into server/[default]/lib the problem went away. I have *no* idea why this worked, but we are sticking with it as I have no time to become an expert on JBoss classloading, etc.

            (We also bumped up our PermGenSpace to 256M, but this only temporarily solved the problem. Removing the JDBC .jar fixed it "permanently".)