是否可以限制单个WAR应用程序在Tomcat中的内存? [英] Is it possible to limit the memory in Tomcat for a single WAR app?

查看:73
本文介绍了是否可以限制单个WAR应用程序在Tomcat中的内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个vaadin应用程序,如果不限制RAM,WAR将在Tomcat中将其运行到2.5 + gb,但是如果使用

I have a vaadin app where if I don't limit the RAM, the WAR will run it up to 2.5+gb in Tomcat but if I limit it to 1gb in eclipse using this the program will stay steady around 700mb(when no action)-1.2gb (when running a large dataset).

是否有一种导出具有内存限制的战争的方法?我在同一台Tomcat服务器上还有其他战争应用程序,但这是唯一运行猖ramp的应用程序.还是更好的做法是创建一个单独的虚拟服务器,并为此单独在Tomcat中设置内存限制?

Is there a way to export this war with the memory constraint? I have other war apps on the same Tomcat server, but this one is the only one that runs rampant. Or is it better practice to create a separate virtual server and set the memory constraint in Tomcat just for it?

推荐答案

Eclipse在单独的JVM中运行每个程序.

Eclipse runs each program in a separate JVM.

Tomcat实例在JVM内运行,因此将在其中部署所有Web应用程序.您可以启动第二个Tomcat实例(从而启动第二个JVM),并为每个JVM设置特定的内存约束

A Tomcat instance runs inside of a JVM, and so will all web apps deployed in it. You could start a second Tomcat instance (and thus a second JVM) and set the specific memory constraints for each JVM

这篇关于是否可以限制单个WAR应用程序在Tomcat中的内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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