Results 1 to 2 of 2

Thread: Java.lang.outOfMemoryError even after setting JAVA_OPTS=-Xmx512m

  1. #1
    Join Date
    Jul 2007

    Java.lang.outOfMemoryError even after setting JAVA_OPTS=-Xmx512m

    I have set Java_opts and catalina_opts one after another still I am getting error

    type Exception report


    description The server encountered an internal error () that prevented it from fulfilling this request.


    org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.OutOfMemoryError: Java heap space

    As I understand it's caused by garbage collector not freeing objects, Is there any precautionary measrues I can take that I will not get this error in first place.

    Thank you.

  2. #2
    Join Date
    Jun 2009
    Try a profiler to find if you are not allocating enough perm or heap space. Start with jvmstat visualgc which has easy graphical output

    You might have a memory leak somewhere that should be fixed or your application needs alot of memory.
    If you need more memory then increase your heap size:
    java -Xms<initial heap size> -Xmx<maximum heap size>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center