Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说tomcat默认线程池大小_tomcat线程池满应该如何处理,希望能够帮助你!!!。
Tomcat线程池及性能优化(重点)
只需安装Tomcat
[root@localhost ~]# vim /usr/local/tomcat8/conf/server.xml
修改处如下:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxThreads="1024" minSpareThreads="100" prestarminSpareThreads="true" />
[root@localhost ~]# netstat -anpt | grep :8080
tcp6 0 0 :::8080 :::* LISTEN 9109/java
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# iptables -F
[root@localhost ~]# /usr/local/tomcat8/bin/shutdown.sh
[root@localhost ~]# /usr/local/tomcat8/bin/startup.sh
修改前
修改后:
=========================================================================================
优化关键词:
一般在生产中可以选择自行优化,优化如下:
[root@localhost ~]# vim /usr/local/tomcat8/conf/server.xml
===============================================================================
禁用TomcatAJP连接器
禁用掉端口:
[root@localhost ~]# vim /usr/local/tomcat8/conf/server.xml
<!-- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />--> //注释掉这一段
今天的分享到此就结束了,感谢您的阅读,如果确实帮到您,您可以动动手指转发给其他人。