gpt4 book ai didi

tomcat7 - 在 Windows 7 上运行的 tomcat 的 maxConnections 默认值

转载 作者:行者123 更新时间:2023-12-04 12:10:02 24 4
gpt4 key购买 nike

我是 tomcat 的新手,想知道 windows 7 上 tomcat 的 maxConnection 的默认值。
已检查 http://tomcat.apache.org/tomcat-7.0-doc/config/http.html它说

maxConnections : 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.



我不确定 <Connector port="8090" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
属于 BIO 或 NIO 或 APR/native

任何帮助,将不胜感激。
谢谢

最佳答案

这是我从 Tomcat 的文档中收集到的:

如果您没有通过 protocol 明确指定它Connector 的属性元素(如上面的示例),tomcat 将搜索本地库(通过 LD_LIBRARY_PATH 在 Unix 上或 Windows 上的 Path 环境变量)以查找 APR 连接器,如果未找到连接器,它将使用 BIO(阻塞 IO)连接器(请参阅协议(protocol)属性 Tomcat HTTP Connector )。

对于 BIO 连接器,如果未指定 maxConnections将采用 maxThreads 的值属性。 maxThreads 的默认值依次为是 200,除非您使用指向 Executor 的 'executor' 属性在这种情况下,它将是执行器元素的 maxThreads 的值。

关于tomcat7 - 在 Windows 7 上运行的 tomcat 的 maxConnections 默认值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14953609/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com