SpringBoot Tomcat最大连接数注意点

本文解释了Tomcat服务器在达到最大连接数(maxConnections+acceptCount)后,会额外接受一个连接但不处理,直至处理中的连接减少,才会重新开始处理新连接,避免ConnectionRefused错误。这源于官方文档的描述。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

注意点

网上看博客都是maxConnections+acceptCount,其实tomcat容器会建立maxConnections+acceptCount+1连接,超过这个数量外的连接才会返回Connection Refused错误。
可以看官方文档中说明:When this number has been reached, the server will accept, but not process, one further connection. This additional connection be blocked until the number of connections being processed falls below maxConnections at which point the server will start accepting and processing new connections again.
当连接数到达最大连接数时会额外接受一个连接,只不过不会被处理,一直阻塞直到最大连接数低于maxConnections 后这个连接才会被处理。

官方文档:tomcat官方文档
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值