7 Replies Latest reply on Aug 6, 2006 3:25 PM by derjohannes

    out of mmory error

    asubu

      Hello All,
      I downloaded the jbpm-starters-kit-3.1. I was able to create my own process and upload it to the server. The server was running fine for a day then all of a sudden started throwing the exception shown below:

      11:12:49,788 ERROR [CommandExecutorThread] java.lang.OutOfMemoryError: PermGen space
      11:12:54,788 DEBUG [JbpmContextInfo] creating jbpm context with service factories '[message, scheduler, logging, persistence, authentication]'
      11:12:54,788 DEBUG [JbpmContext] creating JbpmContext
      11:12:54,788 DEBUG [DbPersistenceServiceFactory] creating persistence service
      11:12:54,788 DEBUG [DbPersistenceService] creating hibernate session
      11:12:54,788 DEBUG [DbPersistenceService] beginning hibernate transaction
      11:12:58,898 DEBUG [CommandExecutorThread] command 'null' threw exception. rolling back transaction
      java.lang.OutOfMemoryError: PermGen space

      At this stage all the jbpm has is the websale and my own created process.

      My java options are set the following:
      set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m
      Has anyone experienced such a problem?
      Also I see a scheduler constantly running every 5 seconds. What does this do?
      Regards,
      Subu

        • 1. Re: out of mmory error
          kukeltje

          permgen space issues can sometimes be solved by setting additional params:

          -XX:PermSize=256m

          -XX:MaxPermSize=1024m

          but it depends on the jvm you are using...

          Another thing is that the error shows in jbpm, but the memory (ab)usage can be caused by other apps ass well if they are running on the same machine.

          The scheduler running every 5 seconds is normal. It looks for timers that need to be fired.

          • 2. Re: out of mmory error
            kukeltje

            btw, the numbers 256 and 1024 are just some I took from an example. You could start a little lower and see what happens

            • 3. Re: out of memory error
              asubu

              Thanks I will try that, but with the same settings running I have not yet
              expierenced that problem again.
              Also the JVM that I am using is -->java version "1.5.0_06"

              Regards to timers, is this something that is configurable?


              Regards
              Subu

              • 4. Re: out of mmory error
                kukeltje

                timers: I do not know. If it is in the source code, it is configurable ;-) The docs say nothing about this, so search the source.

                • 5. Re: out of mmory error
                  derjohannes

                   


                  permgen space issues can sometimes be solved by setting additional params:
                  -XX:PermSize=256m
                  -XX:MaxPermSize=1024m


                  Where exactly (in which file, in which line) do I have to put these params?



                  • 6. Re: out of mmory error
                    kukeltje

                    uhhmmm.... in the file where the jvm is started? or in JAVA_OPTS env if it is used or..... it is totally dependend on your environment and I think you should be able to find LOTS of info on this using google

                    • 7. Re: out of mmory error
                      derjohannes

                       

                      "kukeltje" wrote:
                      it is totally dependend on your environment and I think you should be able to find LOTS of info on this using google


                      Googling made me remember the citation
                      "We are drowning in information and starving for knowledge.", so I tried harder to find a solution myself...and finally i found the an interesting information in the JBoss boot log:

                      "JAVA_OPTS: -Dprogram.name=run.bat"

                      So I searched for a run.bat file, found it in the root dir of my jbpm starters kit installation, looked into it and I finally found the lines:

                      rem Sun JVM memory allocation pool parameters. Modify as appropriate.
                      set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m

                      to which i added another line:
                      set JAVA_OPTS=%JAVA_OPTS% -XX:PermSize=256m -XX:MaxPermSize=1024m

                      It's nice when information transforms to knowledge... ;-)