I am getting the following exception in my application server
Exception java.lang.OutOfMemoryError: requested 1024000 bytes .
Following is the GC log
Heap at VM Abort:
def new generation total 24000K, used 21081K [0x10010000, 0x11a10000, 0x171d0000)
eden space 21376K, 86% used [0x10010000, 0x11216740, 0x114f0000)
from space 2624K, 100% used [0x11780000, 0x11a10000, 0x11a10000)
to space 2624K, 0% used [0x114f0000, 0x114f0000, 0x11780000)
tenured generation total 135796K, used 40776K [0x171d0000, 0x1f66d000, 0x50010000)
the space 135796K, 30% used [0x171d0000, 0x199a2020, 0x199a2200, 0x1f66d000)
compacting perm gen total 38144K, used 38078K [0x50010000, 0x52550000, 0x54010000)
the space 38144K, 99% used [0x50010000, 0x5253f9a8, 0x5253fa00, 0x52550000)
What could be the source of this Out of swap space error.
It looks like you are out of space in the permanent generation. The permanent generation is used for things like loaded classes. How many classes have you loaded? Do you expect to be unloading classes, and if so, do you see them being unloaded? Run with the command line flags
to see that activity. You can also use space in the permanent generation by intern'ing a lot of Strings, but that's unusual.
What platform (hardware, operating system, Java virtual machine) are you running on? What kinds of command line tunings have you done? (E.g., it appears that you've increased your overall heap size with -Xmx, and decreased your permanent generation size with -XX:MaxPermSize=.)
Is the problem reproducible, or did you just see this once? Since you see the message "Out of swap space", how much swap space do you have available when the JVM throws this exception? What else is running on the machine (i.e., reserving swap space) when this happens?
Out of swap space error generally occurs when your native heap is running out of memory not the java heap.The following could be the suspects which may leak the native memory:
1) JDBC Objects if it is a native driver
2) Object streams
4) Any other native libraries
Tracing the jni calls to the memory would give a better idea. You can use OS Specific tools also to monitor the native memory. Also you can look for the java heap for the growth of the above mentioned java objects and try reducing it. Also make sure that you have got enough space in the swap file system.
What is the application server that you are using? What is the version of your JDK?