7 Replies Latest reply on Oct 28, 2010 2:28 PM by peterj

    Out of memory Error




      I am getting error in jboss error log.

      please anyone help me..





      JBOSS error log

      CO013_USER_ID_MASTER this_
      2010-10-27 13:19:24,401 ERROR [org.apache.tomcat.util.net.JIoEndpoint] (ajp- Error allocating socket processor
      java.lang.OutOfMemoryError: unable to create new native thread
      at java.lang.Thread.start0(Native Method)
      at java.lang.Thread.start(Thread.java:597)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.start(JIoEndpoint.java:471)
      at org.apache.tomcat.util.net.JIoEndpoint.newWorkerThread(JIoEndpoint.java:691)
      at org.apache.tomcat.util.net.JIoEndpoint.createWorkerThread(JIoEndpoint.java:670)
      at org.apache.tomcat.util.net.JIoEndpoint.getWorkerThread(JIoEndpoint.java:702)
      at org.apache.tomcat.util.net.JIoEndpoint.processSocket(JIoEndpoint.java:737)
      at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:313)
      at java.lang.Thread.run(Thread.java:619)
      2010-10-27 13:19:24,404 INFO [STDOUT] (ajp- Hibernate:
      this_.ID as ID13_0_,
      this_.USER_ID as USER2_13_0_,
      this_.USER_LOGIN_ID as USER3_13_0_,
      this_.ULB_CODE as ULB4_13_0_,



      Thanks in advance..

        • 1. Re: Out of memory Error

          The OutOfMemoryError is unfortunatly also thrown in case of missing other system resource (like threads, filehandle).

          This looks like that your system is out of resources to create new processes or filehandle. You have to look whether these are

          restricted by user or system.

          e.g. AFAIK number of filehandles at HP-UX server's are too low per default.

          • 2. Re: Out of memory Error


            Thanks for your reply..

            There has been a frequent(nearly once in a week) memory out of bound exception coming in the production ofbiz server, in which case we have to restart the server its working fine but its not permanent solution. I have allocated 2GB of memory of ofbiz, but the problem is still coming.


            please anyone help me..

            • 3. Re: Out of memory Error

              As I said, if you refere to the OOME in your initial post it is not a Memory relaed problem.

              The JVM is not able to create a new thread!

              • 4. Re: Out of memory Error


                how to increase heap size..?

                • 5. Re: Out of memory Error

                  You might increase the heap size with -Xmx=???m, ??? depends to your OS and JVM, for a 64Bit OS and a 32Bit VM the maximum is between 2000m and 3600m.


                  But as I said before I suppose you have problems with filehandles or other system resources...

                  • 6. Re: Out of memory Error

                    Like Wolf-Dieter mentioned, the OOM in your logs isn't related to heap size. Take a look at these wiki articles:




                    • 7. Re: Out of memory Error

                      It would help if you told us which OS you were running. And the version of JBoss AS and JVM might help also.


                      I have run into this OOME under two situations:

                      a) I booted 32-bit Windows with the /3G option which divides the 4GB process address space as 3GB for the app and 1GB for the OS (the default is 2GB each). The OS needs to use memory in its space for each thread created, and with only 1GB of space we could never get above around 150 threads.

                      b) Running in a 32-bit OS (Windows or Linux), with a too-large stack size (the default stack size various by JVM version and OS, on some it is 1MB!), I ran out of room in the apps address space to allocate the memeory for another thread. This can be simulated easily by allocating a very large heap, which leaves little process memory available for other things.