Tomcat永远不会返回503

发布于 2025-01-19 13:44:32 字数 741 浏览 0 评论 0 原文

当我的WebApp获得很多同时连接时,我正在遇到一些问题(即服务开始时)。
我期望在一定程度上的级别上让tomcat回答说他不能接受更多,通过回答代码503 的错误。
我已经阅读了文档并理解(我希望) maxthreads acceptcount maxConnections
我还阅读了很多帖子:

,但即使将MaxThreads设置为1。

当我发现有关如何解决503期问题的许多帖子时,我显然缺少一些东西...有人可以帮忙吗?

I am experiencing some issues when my webapp is getting lots of simultaneous connections (ie. when the service is starting).
I am expecting at a certain level of charge to have tomcat answer that he can't take more, by answer an error with code 503.
I have read the documentation and understood (I hope) the usage of maxThreads, acceptCount and maxConnections.
I also read lots of posts:

but I was not able to reproduce a tomcat answering 503, even by setting maxThreads to 1.

As I find lots of posts on how to solve 503 issues, I am obviously missing something... Can anyone help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不知在何时 2025-01-26 13:44:33

当试图直接连接到tomcat时,我看到了同样的事情。

我长期以来使用Apache Httpserver作为Tomcat的前端,当所有可用的过程和线程耗尽时,都可以看到503。我期望看到一些方法至少可以配置为拒绝其他并发。

从我对源代码的天真阅读中,我也看不到由于并发请求而导致的503是如何发生的。

当我尝试通过限制连接器(即最小化线程,接受计数和最大连接),将睡眠放入测试JSP页面,并使用大量并发请求键入该页面时 - 我得到客户端时副暂停,但没有503。

I am seeing the same thing when trying to connect directly to Tomcat.

I've long used Apache HttpServer as a front-end to Tomcat and seen 503 when all available processes and threads are exhausted. I'd expect to see some means by which Tomcat can at least be configured to reject additional concurrency.

From my naive reading of the source code I also can't see how 503's occur due to concurrent requests.

And when I try to force 503's from a test environment by constraining the connector (i.e. minimizing threads, accept count, and max connections), putting sleeps in a test JSP page, and hitting that page with lots of concurrent requests -- I get client side timeouts but no 503's.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文