在日常开发中可能会遇到需要修改tomcat 配置属性maxPoolSize的要求,针对不同版本如何修改这个配置做个简单梳理。(该表格只找了几个典型版本号tomcat测试,其他版本大致都一样)
版本 | 默认值 | 配置说明 | 修改方式 | 备注 |
---|---|---|---|---|
apache tomcat 7.0.63以前 | 2097152 | 设置为0和负数均可以代表不限制 | ||
apache tomcat 7.0.63以后 | 2097152 | 不可以设置为0,只能是负数代表不限制 | 包含7.0.63版本 | |
taobao-tomcat-7.0.59 | 2097152 | 设置为0和负数均可以代表不限制 | ||
apache tomcat 8.0 | 2097152 | |||
apache tomcat 8.5.38 | 2097152 | 设置负数代表不限制 | 需要添加maxPostSize这个属性,默认是没有这个属性 | 亲测有效 |
apache tomcat 9.0 | 2097152 |
参考博文:https://blog.csdn.net/erlian1992/article/details/80209947
https://tomcat.apache.org/tomcat-7.0-doc/config/http.html
https://blog.csdn.net/whatever8975757/article/details/60576188