Does Cloudfoundry support apps that require larger memory?

☆樱花仙子☆ 提交于 2019-12-21 05:46:14

问题


I have been developing a website using grails and demo'ing it using Cloudfoundry. Grails and Cloudfoundry are awesome! The are easy to use with support from grails plugins and tools in STS.

My app uses MySQL, MongoDB, SpringSecurity, and more. I have only used it with one user logged in and I periodically get java.lang.OutOfMemoryError: PermGen space

I have increased the memory to 1G using the grails plugin. I tried to set JAVA_OPTS to increase the memory and this did not work.

I am going to examine where the memory is being used, but it seems that one user and a tiny set of demo data should not be pushing the memory limits.

Does Cloudfoundry support apps that require larger memory?

After reading this post I set the MaxPermSize to 512M and I no longer have out of memory errors. I'm using grails cmdline on windows and I cannot get more than one JAVA_OPTS set, only the first in a list is used. grails cf-env-add JAVA_OPTS "-XX:MaxPermSize=512m -Xms512M -Xmx512M" This one setting has added stability to my demo site.


回答1:


The original poster has an answer in the original question:

After reading this post I set the MaxPermSize to 512M and I no longer have out of memory errors. I'm using grails cmdline on windows and I cannot get more than one JAVA_OPTS set, only the first in a list is used. grails cf-env-add JAVA_OPTS "-XX:MaxPermSize=512m -Xms512M -Xmx512M" This one setting has added stability to my demo site




回答2:


It's a PermGen space, and at this case it's in development mode only (or when you're using Tomcat and redeploy your app few times, its not a CloudFoundry case).

See official FAQ: OMG I get OutOfMemoryErrors or PermGen Space errors when running Grails in development mode. What do I do?



来源:https://stackoverflow.com/questions/10689043/does-cloudfoundry-support-apps-that-require-larger-memory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!