You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
conf/server.xml 中的线程池配置
|
|
|
|
|
```xml
|
|
|
|
|
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="500" minSpareThreads="25" maxIdleTime="60000" prestartminSpareThreads="true" maxQueueSize="100" />
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
name: 线程名称
|
|
|
|
|
namePrefix: 线程前缀
|
|
|
|
|
maxThreads : 最大并发连接数,不配置时默认200,一般建议设置500~ 800 ,要根据自己的硬件设施条件和实际业务需求而定。
|
|
|
|
|
minSpareThreads:Tomcat启动初始化的线程数,默认值25
|
|
|
|
|
prestartminSpareThreads:在tomcat初始化的时候就初始化minSpareThreads的值, 不设置true时minSpareThreads
|
|
|
|
|
maxQueueSize: 最大的等待队列数,超过则拒绝请求
|
|
|
|
|
minSpareThreads:线程最大空闲时间60秒。
|
|
|
|
|
|
|
|
|
|
|