<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
The default implementation supports the following attributes:
| Attribute | Description |
|---|---|
threadPriority
|
(int) The thread priority for threads in the executor, the default is |
daemon
|
(boolean) Whether the threads should be daemon threads or not, the default is |
namePrefix
|
(String) The name prefix for each thread created by the executor.
The thread name for an individual thread will be |
maxThreads
|
(int) The max number of active threads in this pool, default is 最大线程数(默认200)
[root@M600-52 ~]# ulimit -a |
minSpareThreads
|
(int) The minimum number of threads always kept alive, default is 最小空闲时,还要保存的线程数。默认25 |
maxIdleTime
|
(int) The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less
or equal to minSpareThreads. Default value is |
maxQueueSize
|
(int) The maximum number of runnable tasks that can queue up awaiting
execution before we reject them. Default value is 在拒绝之前,会保存到队列当中,等待处理。 队列的最大长度为Integer.MAX_VALUE
|
prestartminSpareThreads
|
(boolean) Whether minSpareThreads should be started when starting the Executor or not,
the default is |
threadRenewalDelay
|
After a context is stopped, threads in the pool are renewed. To avoid renewing all threads at the same time, this delay is observed between 2 threads being renewed. Value is in ms, default value is 1000ms. If negative, threads are not renewed. 当线程停止后,如果有需要,会进行重建,为了避免多个线程,该设置可以检测是否有2个线程同时被创建,如果是,则会按照该参数,延迟指定时间创建。 如果拒绝,则线程不会被重建。 |
本文详细介绍了Tomcat线程池的配置属性,包括线程优先级、后台进程方式、线程前缀、最大线程数、最小空闲线程数、最大空闲时间等,并解释了这些配置如何影响应用服务器的性能。
1618

被折叠的 条评论
为什么被折叠?



