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/