减少 Tomcat 的守护线程数量
我将 Tomcat 5.5 与 Eclipse 结合使用,每次启动时 Tomcat 都会生成大约 15 到 20 个守护进程线程。如果您想“一次”处理多个请求,它非常有用。
这在我的开发服务器上是肤浅的并且浪费资源。
如何减少守护进程线程的数量?
I'm using Tomcat 5.5 with Eclipse and at every startup the Tomcat spawns about 15 to 20 Daemon threads. It's usefull if you want to handle several requests "at once".
This is superficial on my development server and wastes ressources.
How can I reduce this number of Daemon threads?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,你这样说是不是有点夸张了?仅 15-20 个线程就“浪费资源”?或者只是他们以某种方式惹恼你?您遇到的具体问题是什么?
无论如何,您能做的最好的事情就是查看 HTTP 连接器配置。其中您可以使用诸如
acceptCount
、maxSpareThreads
和maxThreads
之类的属性。First of all, aren't you a bit exaggerating on this? "Wastes resources" with only 15-20 threads? Or is it just that they annoy you somehow? What's the exact problem you have with this?
At any way, best what you can do is to take a look in the HTTP connector configuration. There in you have attributes like
acceptCount
,maxSpareThreads
andmaxThreads
with which you can play.