生产服务器上的Tomcat,PermGen并重新部署 [英] Tomcat on production server, PermGen and redeploys

查看:120
本文介绍了生产服务器上的Tomcat,PermGen并重新部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来像

 MemoryError: PermGen space
 java.lang.OutOfMemoryError: PermGen space

是一个常见问题。您可以增加烫发空间的大小,但在100或200次重新部署后,它将是满的。跟踪ClassLoader内存泄漏几乎是不可能的。

is a common problem. You can Increase the size of your perm space, but after 100 or 200 redeploys it will be full. Tracking ClassLoader memory leaks is nearly impossible.

您在生产服务器上使用Tomcat(或另一个简单的servlet容器 - Jetty?)的方法是什么?每次部署解决方案后服务器是否重启?

What are your methods for Tomcat (or another simple servlet container - Jetty?) on production server? Is server restart after each deploy a solution?

您是否为许多应用程序使用一个Tomcat?

Do you use one Tomcat for many applications ?

也许我应该在不同的端口上使用许多Jetty服务器(或者是一个嵌入式Jetty)并且每次都取消部署/重启/部署?

Maybe I should use many Jetty servers on different ports (or an embedded Jetty) and do undeploy/restart/deploy each time ?

推荐答案

我放弃了使用tomcat管理器而现在总是关闭tomcat重新部署。

I gave up on using the tomcat manager and now always shutdown tomcat to redeploy.

我们在同一台服务器上运行两个tomcats,并使用带有mod_proxy_ajp的apache webserver,这样用户就可以通过同一个端口80访问这两个应用程序。这很不错还因为当tomcat关闭时,用户会看到apache Service Unavailable页面。

We run two tomcats on the same server and use apache webserver with mod_proxy_ajp so users can access both apps via the same port 80. This is nice also because the users see the apache Service Unavailable page when the tomcat is down.

这篇关于生产服务器上的Tomcat,PermGen并重新部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆