1.設置內存
在catalina.sh第一行加上
JAVA_OPTS="-Xms1024m -Xmx1024m -Xss1024K -XX:PermSize=128m -XX:MaxPermSize=256m"
2.配置 Executor (主要爲了設置併發相關的參數)
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="500"
minSpareThreads="400" />
3.修改Connector
URIEncoding
acceptCount
enableLookups executor 等屬性
<Connector executor="tomcatThreadPool" URIEncoding="UTF-8"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000" redirectPort="8443"
enableLookups="false" acceptCount="1000" /> tomcat
4.Linux 下 修改tomcat程序權限 併發
bin目錄下面執行:chmod a+x *.sh spa