3 Replies Latest reply: Mar 9, 2009 4:33 AM by 843829 RSS

    Out of swap space

      Hi All,

      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.

      Any help is greatly appreciated.

      Thanks & Regards,
        • 1. Re: Out of swap space
          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
          -XX:+TraceClassLoading -XX:+TraceClassUnloading
          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?
          • 2. Re: Out of swap space
            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
            3) NIO
            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?
            • 3. Re: Out of swap space

              this is sravan, my applicatin size 90mb

              i am installing apache tomcat 6.0.18 64bit

              i am installing jdk 1.5 32 bit

              i am running the application in the windows2003 server 64bit

              and my ram size 440mb

              when i am starting the tomcat its takeing 160mb for startup

              after one user is using my application i am getting exception?

              [2009-03-05 16:14:56] [info]
              [2009-03-05 16:14:56] [info] in thread "
              [2009-03-05 16:14:56] [info] CompilerThread1
              [2009-03-05 16:14:56] [info] "
              [2009-03-05 16:14:56] [info] java.lang.OutOfMemoryError: requested
              [2009-03-05 16:14:56] [info] 453424
              [2009-03-05 16:14:56] [info] bytes
              [2009-03-05 16:14:56] [info] for
              [2009-03-05 16:14:56] [info] Chunk::new
              [2009-03-05 16:14:56] [info] . Out of swap space?

              so please help me out in this situation

              how to solve this problem ?

              pls reply to my mail -- sravan998@gmail.com