作为Windows服务运行时,如何增加Tomcat 7上的内存? [英] How do I increase memory on Tomcat 7 when running as a Windows Service?

查看:348
本文介绍了作为Windows服务运行时,如何增加Tomcat 7上的内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Tomcat 7作为Windows服务(XP和Windows 7)运行.

I am trying to run Tomcat 7 as a Windows Service (XP and Windows 7).

我在catalina.bat中看到了设置-Xmx和-Xms jvm args的地方,但是当使用$ CATALINA_HOME/bin/service.bat安装服务名时,我不确定该如何做.我环顾四周,但最好的发现是我需要更新Windows注册表项,尽管我不确定要编辑哪个.

I see places to set the -Xmx and -Xms jvm args in catalina.bat, but I'm not sure how to do it when using $CATALINA_HOME/bin/service.bat install service-name. I looked around but the best I could find was that I needed to update windows registry key, though I'm not sure which one to edit.

我希望有一种更简单的方法,是吗?

I'm hoping there's an easier way, is there?

更新:我之所以不使用Windows Installer,主要是因为我在同一台计算机上使用多个端口运行Tomcat的多个实例(出于某些原因,我不想在这里介绍).如果我可以将安装程序与使用不同端口的多个实例一起使用,那么我想知道如何,但是无论如何,如果没有安装程序随附的UI工具,是否可以增加tomcat Windows服务的内存?

Update: I'm not using the windows installer mainly because I'm running multiple instances of tomcat on the same machine but with different ports (for reasons I'd rather not go into here). If I can use the installer with multiple instances using different ports, then I'd like to know how, but regardless, is it possible to do increase the memory on a tomcat windows service without the UI tools that come with the installer?

推荐答案

假设您已从

Assuming that you've downloaded and installed Tomcat as Windows Service Installer exe file from the Tomcat homepage, then check the Apache feather icon in the systray (or when absent, run Monitor Tomcat from the start menu). Doubleclick the feather icon and go to the Java tab. There you can configure the memory.

重新启动服务以使更改生效.

Restart the service to let the changes take effect.

这篇关于作为Windows服务运行时,如何增加Tomcat 7上的内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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