Tomcat 作为 64 位 Windows 控制台上的服务 v/s Tomcat [英] Tomcat as a service v/s Tomcat on console for 64 bit Windows

查看:41
本文介绍了Tomcat 作为 64 位 Windows 控制台上的服务 v/s Tomcat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 64 位 Windows 上启动 Tomcat(64 位)时,我的应用程序 (Solr) 开始出现内存不足错误.我已经使用 Windows 环境变量 CATALINA_OPTS 为 Tomcat 分配了 5GB 的最小/最大堆.

When I start Tomcat (64 bit) on 64 bit Windows my application (Solr) starts giving Out of Memory Errors. I have allocated min/max heap of 5GB for both to Tomcat using Windows Environment variable CATALINA_OPTS.

但是,当我使用 startup.bat 在命令行上启动 tomcat 时,它不会出现任何此类错误,并且我的应用程序正在触及 5GB,因此很明显它正在考虑提交的最小/最大堆.

However when I start tomcat on command line using startup.bat it does not give any such errors and my application is touching 5GB so it is clear that it is taking into consideration the min/max heap committed.

现在我的问题是:在将 tomcat 作为服务启动时我是否需要做任何额外的事情,我的意思是设置一些参数等?对于 Solr 上较小的索引大小,Tomcat 中的一切似乎都很好.对于大索引大小,会发生此问题.作为服务运行时,它是否不接CATALINA_OPTS?

Now my question is: Do I need to do any additional stuff while starting tomcat as a service, I mean setting some params etc? For less Index size on Solr everything seems to be fine in Tomcat. This problem happens for large index sizes. Is it not picking up CATALINA_OPTS while running as a service?

推荐答案

要为 TOMCAT windows 服务设置内存参数,请执行以下操作 -

To set the memory arguments for TOMCAT windows service do that following -

  1. 启动/bin/tomcat7w.exe
  2. 点击 Java
  3. 设置您的内存参数

重启服务.

这篇关于Tomcat 作为 64 位 Windows 控制台上的服务 v/s Tomcat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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