Skip to main content
Inspiring
June 8, 2010
Question

Getting java.lang.outofmemoryerror: Java heap space error

  • June 8, 2010
  • 2 replies
  • 3433 views

I am using coldfusion 8. I frequently get the error 'java.lang.outofmemoryerror: Java heap space'. Can anyone help me?

Error Details :

500
Root cause:
java.lang.outofmemoryerror: Java heap space

javax.servlet.servletException: Root Cause:
java.lang.outofmemoryerror: Java heap space

Thanks in advance,

Regards,

Satheesh.

    This topic has been closed for replies.

    2 replies

    Legend
    November 9, 2010

    Hello Satheesh,

    How did you go with this did FR or seeFusion resolve matter for you?

    Regards, Carl.

    Inspiring
    June 8, 2010

    Well... what does the error message tell you is wrong?  You're running out of memory.  I presume you understand how computer memory works, if not specifically how Java memory allocation works.  So... you have x amount of memory, and you're trying to use >x amount of memory.  You can't do that.  There are two approaches to dealing with a problem like this:

    a) have more memory;

    b) use less memory.

    What are your JVM memory settings?  They're in jvm.config dir, which'll be - by default - in your Jrun4/bin dir for a multi-server install, or somewhere like ColdFusion/runtime/bin or something like that on a stand-alone install.

    Next... what are you loading into memory?  This is trickier to answer.  But every variable you create takes up memory.  People often load up the application or session scopes with stuff that's "convenient" to store in shared-scope memory, but really chew through it.  Putting CFC instances in the session scope is a really good way to waste memory, as they seem to have quite a large footprint.

    It's really impossible to say what's eating the memory based on what info you've given us (basically: none), but you can use things like FusionReactor to examine what's going into memory.  Or CF* Enterprise has some of its own memory profiling stuff... I've never used it but it might be of some use.

    Have you googled "coldfusion java.lang.outofmemory"?

    --

    Adam