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.
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..
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!
how to increase heap size..?
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...
Like Wolf-Dieter mentioned, the OOM in your logs isn't related to heap size. Take a look at these wiki articles:
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.