java.lang.OutOfMemoryError: Java heap space

scott.crevier's Avatar


20 Jan, 2012 09:21 PM

Users just started reporting slowness when using Cascade. Since 7:25am today, I've got this error in my log file over 800 times:

java.lang.OutOfMemoryError: Java heap space

I searched around and found a couple of discussions about this error, but nothing on a linux system. Help please.

  1. 1 Posted by Joel on 20 Jan, 2012 09:26 PM

    Joel's Avatar

    Hi Scott,

    We have an article which details this quite well:

    Please let me know if you have any additional questions regarding modifying the heap allocated to your instance.


  2. 2 Posted by scott.crevier on 20 Jan, 2012 09:27 PM

    scott.crevier's Avatar

    When posting this, I saw the message about changing the JAVA_OPTS setting

    export JAVA_OPTS="-Xmx768M -XX:MaxPermSize=128m -Djava.awt.headless=true -Dfile.encoding=UTF-8"

    my current setting is this:

    export JAVA_OPTS="-Xmx512M -XX:MaxPermSize=192m -Djava.awt.headless=true -Dfile.encoding=UTF-8"

    Should I make that change? Doing so would increase my 'Xmx' value but decrease the MaxPermSize setting? Or should I just change the Xmx setting?

  3. 3 Posted by Joel on 20 Jan, 2012 09:30 PM

    Joel's Avatar


    You'll want to increase your Xmx and leave your MaxPermSize the same (at 192m).


  4. 4 Posted by scott.crevier on 20 Jan, 2012 09:50 PM

    scott.crevier's Avatar

    I made the change. That setting is now:

    export JAVA_OPTS="-Xmx768M -XX:MaxPermSize=192m -Djava.awt.headless=true -Dfile.encoding=UTF-8"

    After starting cascade again, I can no longer login (before it was just slow). So I rebooted the server. Still can't login. My cascade.log file has over 20,000 of these

    ERROR [StatusCallbackImpl] Could not update percentage done:

    My cascade.log file grew from 1.2MB (from all day) to over 15MB in just a few minutes.

  5. 5 Posted by scott.crevier on 20 Jan, 2012 09:59 PM

    scott.crevier's Avatar

    I changed that setting back and stopped/started Cascade. Didn't help. Cascade is still inaccessible.

    I just left a voice message on your support line. Please call me back. 920-403-4335.

  6. 6 Posted by Joel on 20 Jan, 2012 10:36 PM

    Joel's Avatar


    Just to reiterate, the SQL we issued was:

    update DATABASECHANGELOGLOCK set locked=0, lockgranted=null, lockedby=null where id=1;

    This cleared the last connection's lock form the database which was causing the start hangup. Also, we updated your heap's min and max variables to 768M so you should be fine on the memory errors now. However, if you do encounter the heap memory errors again, please feel free to increase them accordingly.


  7. Joel closed this discussion on 20 Jan, 2012 10:36 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac