Tomcat连接参数的优化,主要是针对吞吐量做优化:
修改conf/server.xml文件,把原来
<Connector port="8080" protocol="HTTP/1.1" />
改为:
<Connector port="8080" protocol="HTTP/1.1"
URIEncoding="UTF-8"
minSpareThreads="25"
maxSpareThreads="75"
enableLookups="false"
disableUploadTimeout="true"
connectionTimeout="20000"
acceptCount="300"
maxThreads="300"
maxProcessors="1000"
minProcessors="5"
useURIValidationHack="false"
compression="on"
compressionMinSize="2048"
compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain"
redirectPort="8443"/>
时间: 2024-10-18 05:36:06