Tomcat每个Web应用程序的内存设置 [英] Tomcat per webapp memory settings

查看:90
本文介绍了Tomcat每个Web应用程序的内存设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个在Tomcat中运行的Web应用程序. Java堆空间已分配给Tomcat,并且为两个应用程序共享.在这种情况下,一个应用程序消耗更多,而其他应用程序消耗OUT_OF_MEMORY.

I am having two webapplication running inside tomcat. Java Heap space is allocated for Tomcat and it is shared for both appliaction. In that one application consumes more and other is getting OUT_OF_MEMORY.

有什么方法可以设置每个Web应用程序的内存设置.从分配给Tomcat的总内存中,一个Web应用程序占70%,其他Web应用程序占30%.

Is there any way to set memory settings per web application. Say 70% for one webapp and 30% for other from the overall memory allocated to Tomcat.

问候 加内什

推荐答案

该内存是按JVM实例定义的,因此,如果您使用一个tomcat,则无法做到这一点.

The memory is defined per JVM instance, so if you are using one tomcat you cannot do it.

但是,您可以运行两个tomcat实例(每个Web应用程序一个),然后可以更好地控制每个Web应用程序的内存分配.

However you can run two tomcat instances - one per web application - and then you will finer control on memory allocation for each webapp.

这篇关于Tomcat每个Web应用程序的内存设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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