13 Replies Latest reply on May 23, 2011 10:54 AM by wdfink

    PermGen Space almost overflow. Using jboss 4.2.2GA

    hazem4work

      I've got OutOfMemoryError: PermGen space, and i'm trying many times to change it into run.conf under jboss/bin/run.conf but still i can't see any changes after restart jboss

      im using Jboss 4.2.2GA

      OS: Linux centos

      jvm: 1.5.2 hotspot server 64bit

      please, any suggestion..

       

      Heap Configuration:
        
      MinHeapFreeRatio = 40
        
      MaxHeapFreeRatio = 70
        
      MaxHeapSize      = 1073741824 (1024.0MB)
        
      NewSize          = 2686976 (2.5625MB)
        
      MaxNewSize       = -65536 (-0.0625MB)
        
      OldSize          = 1835008 (1.75MB)
        
      NewRatio         = 2
        
      SurvivorRatio    = 8
        
      PermSize         = 21757952 (20.75MB)
        
      MaxPermSize      = 88080384 (84.0MB)

      Heap Usage:
      PS
      Young Generation
      Eden Space:
         capacity
      = 332922880 (317.5MB)
         used    
      = 39076184 (37.265953063964844MB)
         free    
      = 293846696 (280.23404693603516MB)
        
      11.73730805164247% used
      From Space:
         capacity
      = 12582912 (12.0MB)
         used    
      = 0 (0.0MB)
         free    
      = 12582912 (12.0MB)
        
      0.0% used
      To Space:
         capacity
      = 12386304 (11.8125MB)
         used    
      = 0 (0.0MB)
         free    
      = 12386304 (11.8125MB)
        
      0.0% used
      PS
      Old Generation
         capacity
      = 691994624 (659.9375MB)
         used    
      = 159954680 (152.54467010498047MB)
         free    
      = 532039944 (507.39282989501953MB)
        
      23.115017725918054% used
      PS
      Perm Generation
         capacity
      = 76742656 (73.1875MB)
         used    
      = 75870592 (72.3558349609375MB)
         free    
      = 872064 (0.8316650390625MB)
        
      98.8636515264731% used

        • 1. PermGen Space almost overflow. Using jboss 4.2.2GA
          peterj

          Please post the changes you made in run.conf. From the data you posted, it appears you set max perm size to 88MB. Also, the permgen is usually always around 98-99% full, the JVM will only ask for as much space as it needs because the permgen usage doesn't constantly increase or shrink like the heap does.

           

          Also, how are you starting the app server?

          • 2. Re: PermGen Space almost overflow. Using jboss 4.2.2GA
            hazem4work

            JAVA_OPTS="-Xms1024m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dsun.rmi.dgc.client.gcInterval=900000 -Dsun.rmi.dgc.server.gcInterval=900000"

             

            i'm using service jboss start for starting app server, i've that script into /etc/rc.d/init.d/jboss

             

            so i think it should be MaxPermSize = 512MB is it right or not?

            • 3. PermGen Space almost overflow. Using jboss 4.2.2GA
              wdfink

              The PermSize should fixed in your case to 512MB.

               

              Do you check the start output that the JVM is started with your options.

               

              You should see something like:

              =========================================================================

                JBoss Bootstrap Environment

               

                JBOSS_HOME: /usr/local/jboss

               

                JAVA_HOME: /devel/Java/jdk1.6.0_23

               

                JAVA_OPTS: -Xms128m -Xmx1024m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 ..

               

              =========================================================================

               

              You should check the JAVA_OPTS that you have the correct options, I'm unsure what happen if you have -XX options twice ?!

              • 4. Re: PermGen Space almost overflow. Using jboss 4.2.2GA
                hazem4work

                i can't see echo output maybe coz i'm using service jboss start to launch Jboss, even though i checked using jinfo PID and jmap -heap PID, but i'm still cant see any changes on JAVA_OPTS..is there any places can i put those fields?

                i'll try to add'em in run.sh..is it ok?...coz i'm afraid of Jboss has bug or anything bad...

                 

                by the way, is there any suggestions to check Jboss if it's working well?

                 

                 

                Thanks in advanced...

                • 5. Re: PermGen Space almost overflow. Using jboss 4.2.2GA
                  wdfink

                  You might start your installation with the run.sh script.

                  Also you can redirect the output of the backgroundstart to a file.

                  If you use jconsole <pid> you should see the start options and the current JVM memory ...

                  • 6. Re: PermGen Space almost overflow. Using jboss 4.2.2GA
                    hazem4work

                    when i tried jconsole <PID for org.jboss.Main> i've got this message: <PID> is not managed VM...

                     

                    i've remote access on Linux server...how can i check every Req will come to Jboss, is it possible?

                    • 7. Re: PermGen Space almost overflow. Using jboss 4.2.2GA
                      wdfink

                      Youi have to call jconsole at the same system, use jps command to get the correct PID.

                       

                      What do you mean by 'remote access ... check'?

                      If you call your app-code you might see your own logging. For EJB calls you can use the jbss console to check the access counter on EJB's

                      • 8. Re: PermGen Space almost overflow. Using jboss 4.2.2GA
                        hazem4work

                        what i mean, i've dedicated Linux server and Jboss 4.2.2GA,

                         

                        i can see my log file but i've some doubts that's why i'm looking for something else to understand what's going on into it coz i saw many things inside log file..it's like one action is reapating almost the time

                         

                        do you have any good article explains about jboss console?

                         

                        thanks for your help

                        • 9. PermGen Space almost overflow. Using jboss 4.2.2GA
                          wdfink

                          I'm a bit confused,

                          I suppose your PermGen problem is solved, right?

                          And I don't understand your current problem now.

                           

                          A special manual about the different console implementation is not available.

                          You should have a look into the AdminManual.

                          • 10. Re: PermGen Space almost overflow. Using jboss 4.2.2GA
                            hazem4work

                            no, it's not working yet...but when i was checking my log file, i saw some things worried that's why i wanna check why and how i've got those messages in log file...

                            • 11. PermGen Space almost overflow. Using jboss 4.2.2GA
                              wdfink

                              Ok,

                              forget the messages in your logfile, it might be follow-ups because of the PermGen problem.

                              can you start the JBoss with run.sh directly from console and see the output?

                               

                              Can you figure out what you meant by using 'service jboss start' ?

                              • 12. Re: PermGen Space almost overflow. Using jboss 4.2.2GA
                                hazem4work

                                Hi Wolf..thanks again for your time

                                finaly it's working now..but as i told you..i've some doubts about log file..when i checked it yesterday..it was like same Req reapated many many times...i'm sure it's not PermGen problem do you have any ideas how can i check it..?

                                 

                                and now MaxPermSize it's 512M

                                • 13. Re: PermGen Space almost overflow. Using jboss 4.2.2GA
                                  wdfink

                                  You should open a new thread for your doubts in the log.

                                  Make a clear test and attach log and part of source