Tomcat7.0.42一次处理多少个请求.我们可以在任何外部File中配置相同的内容.如果是这样的话.
Jun*_*san 20
这取决于您用于接受请求的类型连接器.有参数调用maxConnections中server.xml,可配置节流传入请求的数目.以下是Tomcat 7的maxConnections参数的描述:
服务器在任何给定时间接受和处理的最大连接数.达到此数量后,在连接数低于此值之前,服务器将不再接受任何连接.操作系统仍可以接受基于acceptCount设置的连接.默认值因连接器类型而异.对于BIO,缺省值是maxThreads的值,除非使用Executor,在这种情况下,缺省值将是执行程序中maxThreads的值.对于NIO,默认值为10000.对于APR/native,默认值为8192.
请注意,对于Windows上的APR/native,配置的值将减小到1024的最大倍数,小于或等于maxConnections.这是出于性能原因而完成的.如果设置为值-1,则禁用maxConnections功能并且不计算连接
Pra*_*eek 14
在server.xml文件中指定maxThreads哪个specifies maximum number of simultaneous requests that can be handled..
<Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="4443" acceptCount="100"
debug="0" connectionTimeout="60000"
disableUploadTimeout="true" />
Run Code Online (Sandbox Code Playgroud)
在Tomcat 7中,
The maximum number of request processing threads to be created by this Connector, which therefore determines the maximum number of simultaneous requests that can be handled. If not specified, this attribute is set to 200.
编辑:如果执行程序与此连接器关联,则忽略此属性,因为连接器将使用执行程序而不是内部线程池执行任务.
有关更多信息,请参阅此链接Tomcat 7 Doc
| 归档时间: |
|
| 查看次数: |
78050 次 |
| 最近记录: |