java - tomcat默认可以处理多少并发请求

标签 java tomcat

Tomcat7.0.42 一次处理多少个请求。我们可以在任何外部文件中配置相同的吗。如果可以的话。

最佳答案

这取决于您用于接受请求的类型连接器。 server.xml 中有一个名为 maxConnections 的参数,可以配置它来限制传入请求的数量。这里是 description of maxConnections params for Tomcat 7 :

The maximum number of connections that the server will accept and process at any given time. When this number has been reached, the server will not accept any more connections until the number of connections falls below this value. The operating system may still accept connections based on the acceptCount setting. Default value varies by connector type. For BIO the default is the value of maxThreads unless an Executor is used in which case the default will be the value of maxThreads from the executor. For NIO the default is 10000. For APR/native, the default is 8192.

Note that for APR/native on Windows, the configured value will be reduced to the highest multiple of 1024 that is less than or equal to maxConnections. This is done for performance reasons. If set to a value of -1, the maxConnections feature is disabled and connections are not counted

关于java - tomcat默认可以处理多少并发请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18372464/

相关文章:

java - 在 Eclipse 中对 Tomcat 的 war 部署有效,但不能独立于 Tomcat

java - 当 DatagramSocket 处于接收状态时如何意识到

java - 如何生成 JPA 实体元模型?

java - 使用反射从 XML 文件(Java 中)读取数据

java - 如何在不先实例化类的情况下获取完全限定的类名?

java - tomcat本地主机配置

javascript - Web 服务器代码无法正常工作

java - 更改 cookie JSESSIONID 名称

java - 在 libgdx 中更改为游戏结束屏幕

java.lang.NoClassDefFoundError : javax/servlet/http/HttpServletRequest