Grails Tomcat OutofMemory错误 [英] Grails Tomcat OutofMemory error
问题描述
我有一个Grails应用程序,它包含了war命令: grails war
。我需要将它部署到运行Tomcat的远程机器上。
当我执行drop deploy(将WAR文件复制到 C:\ Program Files(x86)\ apache-tomcat-7.0。 37\webapps
)并运行 C:\程序文件(x86)\apache-tomcat-7.0.37\bin\startup.bat
我用PermGem和Heap空间得到了几个 OutofMemory
错误。
我该如何解决这个问题?
当启动tomcat时,我通常会这样做:
export JAVA_OPTS = - Xms1024m -Xmx2024m -XX:MaxPermSize = 512m; export CATALINA_OPTS = - Xms1024m -Xmx2024m -XX:MaxPermSize = 512m; /etc/init.d/tomcat6 restart; tail -f /var/lib/tomcat6/logs/catalina.out
解决了所有内存问题。我有6个Grails应用程序以该配置运行。
I have a Grails app that I have packed with the war command: grails war
. I need to deploy it to a remote machine running Tomcat.
When I do the drop deploy (copying the WAR file into C:\Program Files (x86)\apache-tomcat-7.0.37\webapps
) and run C:\Program Files (x86)\apache-tomcat-7.0.37\bin\startup.bat
I am getting several OutofMemory
errors with PermGem and Heap space.
How can I fix this?
What I usually do when starting tomcat :
export JAVA_OPTS="-Xms1024m -Xmx2024m -XX:MaxPermSize=512m"; export CATALINA_OPTS="-Xms1024m -Xmx2024m -XX:MaxPermSize=512m"; /etc/init.d/tomcat6 restart; tail -f /var/lib/tomcat6/logs/catalina.out
That fixes all memory problems. I have 6 Grails applications running with that configuration.
这篇关于Grails Tomcat OutofMemory错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!