繁体   English   中英

Http 请求无响应:Apache Tomcat

[英]Http request Unresponsive : Apache Tomcat

我们已经在 Apache Tomcat 服务器上部署了我们的应用程序。

很少有用户在调用 API 端点之一时遇到问题,他们没有从服务器得到任何响应并且请求没有响应。

这个问题是间歇性的。

我假设在那段时间 Tomcat 线程池中的所有线程都很忙,因此没有处理请求。

我读到了 Tomcat maxConnection 和 accept-count 参数。

I need clarification on is that Apache Tomcat server would reject http request when all the threads handling the imcoming http request are busy and the queue that holds unprocessed http request are full at Same time?

如果请求队列中有acceptCount请求等待,则后续请求将被拒绝。 来自 apache tomcat 文档:

acceptCount:当所有可能的请求处理线程都在使用时,传入连接请求的最大队列长度。 队列已满时收到的任何请求都将被拒绝。 默认值为 100。

根据您的问题,您使用的 state 没有从服务器获得响应,这表明请求没有被立即拒绝,而是挂起。 如果您的应用程序连接到数据库,那么您可能想要检查数据源的线程池大小和性能,如果您通过网络连接到 3rd 方服务,那么瓶颈可能就在那里,或者确实是 IO 绑定的。 如果 tomcat 拒绝连接,您将立即响应。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM