Sunday, 24 June 2012

Grails app on cloudfondry: Caused by: java.lang.OutOfMemoryError: PermGen space

So I was deploying my app to production (yay) on cloud foundry today. The deployment was successful, but then the system would crap out whenever I goto any of the pages:

504 Gateway Time-out nginx

I checked the logs:

vmc log

...and it appeared to be a permgen issue:

Caused by: java.lang.OutOfMemoryError: PermGen space



To solve it, type this in:

vmc env-add tweetcommendation "JAVA_OPTS=-XX:MaxPermSize=512m"

 To check that you have correctly set the value:

me@tommy:~/repo/tweetcommendation/target$ vmc env tweetcommendation

+-----------+----------------------+
| Variable  | Value                |
+-----------+----------------------+
| JAVA_OPTS | -XX:MaxPermSize=512m |
+-----------+----------------------+

No comments:

Post a Comment