Saturday, 12 May 2012

Deploying to Cloud Foundry when you app uses more than 512 MB

So I was struggling a little today with trying to deploy my Grails application to Cloud Foundry. Initially I was using the Grails cloud-foundry plugin to push my app. However, I kept getting errors about exceeding the memory limit when the server tries to start up. I almost gave up on it, but then I discovered the VMC tool provided by cloud foundry themselves, which when you upload via that tool you can set the memory size limit:

Would you like to deploy from the current directory? [Yn]: y 
 Detected a Java SpringSource Grails Application, is this correct? [Yn]: y 
 Application Deployed URL [tweetcommendation.cloudfoundry.com]:  
 Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]: 2G 
 How many instances? [1]: 1 


So, lesson of the day...don't rely on the Grails cloud foundry plugin...instead use the vmc tool!

No comments:

Post a Comment