tomcat参数配置


The default implementation supports the following attributes:

Attribute Description
threadPriority

(int) The thread priority for threads in the executor, the default is 5 (the value of the Thread.NORM_PRIORITY constant)

daemon

(boolean) Whether the threads should be daemon threads or not, the default is true

namePrefix

(String) The name prefix for each thread created by the executor. The thread name for an individual thread will be namePrefix+threadNumber

maxThreads

(int) The max number of active threads in this pool, default is 200

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 60000(1 minute)

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 false

threadRenewalDelay

(long) If a ThreadLocalLeakPreventionListener is configured, it will notify this executor about stopped contexts. After a context is stopped, threads in the pool are renewed. To avoid renewing all threads at the same time, this option sets a delay between renewal of any 2 threads. The value is in ms, default value is 1000 ms. If value is negative, threads are not renewed.


ibute Description
线程优先级

(int) 线程在执行器中的优先级, 默认值为5 (the value of the Thread.NORM_PRIORITY constant)

守护进程

(boolean) 线程是否应有守护线程, 默认为true

namePrefix

(String) The name prefix for each thread created by the executor. The thread name for an individual thread will be namePrefix+threadNumber

最大线程数

(int) 线程池中最大的活跃线程数,默认值200

最小备用线程

(int) 保持存活的最小线程数,默认值25

线程最大闲置时间

(int) 大于最小备用线程小于最大线程数,闲置线程的存活时间,. 默认60000(1 minute)1分钟

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 false

threadRenewalDelay

(long) If a ThreadLocalLeakPreventionListener is configured, it will notify this executor about stopped contexts. After a context is stopped, threads in the pool are renewed. To avoid renewing all threads at the same time, this option sets a delay between renewal of any 2 threads. The value is in ms, default value is 1000 ms. If value is negative, threads are not renewed.

还有一个参数是    acceptCount 
当tomcat起动的线程数达到最大时,接受排队的请求个数。默认值为100
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

向往的生活Life

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值