Question

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?

Was it helpful?

Solution

You just need to change the amount of resource assigned to the application. You can do this with VMC, for example, to change the memory allocation for an application called my app to 1GB;

vmc mem myapp 1G

Keep in mind that your account had a maximum of 2G for all your applications.

OTHER TIPS

I was having the same problem and the vmc api has changed, and will be replaced by cf.

By now, the way to increase the memory of your app is executing vmc scale [APP] --memory MEMORY. For example, if you want to increase your app to 1G the command will be vmc scale yourappname --memory 1G

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top