tomcat调优方案Maximum number of threads (200) created for connector with address null and port 8091

1.tomcat6大并发出现:INFO: Maximum number of threads (200) created for connector with address null and port 8091
说明:最大线程数错误
解决方案:使用线程池,用较少的线程处理较多的访问,可以提高tomcat处理请求的能力。使用方式:
修改server.xml
server.xml

刚开始设置一直没有起作用,原因是将和分开了
分开写
使用java自带的性监测工具http://blog.csdn.net/feihong247/article/details/7874063
jstack用于打印出给定的java进程ID或core file或远程调试服务的Java堆栈信息,
jstack pid > file.log pid 使用ps aux|grep tomcat 进程号
查看file.log可以查看tomcat服务器java信息
java信息
http://www.blogjava.net/jzone/articles/303979.html
Redis阻塞了,原因是:获得redis实例的方法上使用了同步锁
redis
解决方法:将同步锁synchronized去掉就可以了

2.修改redis连接实例的最大数目
redis

3.修改linux tcp连接数 /etc/sysctl.conf
net.ipv4.tcp_max_tw_buckets = 30000
sudo sysctl -p (让修改生效)
参考:
https://zm8.sm-tc.cn/?src=http%3A%2F%2Fwww.linuxidc.com%2FLinux%2F2013-09%2F90332.htm&uid=ff08990eddbd6ce0a5f89e9041baa5ff&hid=283dd1ce809a03e9ee58a37e7e4d8e00&pos=6&cid=9&time=1456303773973&from=click&restype=1&pagetype=0000004000000402&bu=news_natural&query=tomcat+connector+thread+pool+200&mode=&uc_param_str=dnntnwvepffrgibijbprsvpi

posted @ 2016-03-01 13:54  奋斗鹿  阅读(549)  评论(0编辑  收藏  举报