I am trying to run a Grails app at cloudfoundry.com, but it is returning a 502 Bad Gateway and then a 404 Not Found. I located logs/err.log, and it says:
# Logfile created on 2012-11-22 17:39:55 +0000 by logger.rb/25413
F, [2012-11-22T17:39:55.488036 #10723] FATAL -- : Memory limit of 512M exceeded.
F, [2012-11-22T17:39:55.488101 #10723] FATAL -- : Actual usage was 516M, process terminated.
Prior to this, I was getting PermGen space errors, so I added this to the environment:
+-----------+----------------------------------------+
| Variable | Value |
+-----------+----------------------------------------+
| JAVA_OPTS | -XX:MaxPermSize=512m -Xms512M -Xmx512M |
+-----------+----------------------------------------+
What options do I have? Can I make any tweaks to try to fit my app into 512M? If I reduce MaxPermSize, would that give my app more space? Is there any way to determine exactly what size Perm space is needed?
Or have I simply outgrown CloudFoundry? Is there any way (including by paying) to get a bigger VM at CloudFoundry? Or do I have to move to a different service entirely?