tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080
1、INFO: Maximum number of threads (200) created for connector with address null and port 8091
说明:最大线程数错误
解决方案:
使用线程池,用较少的线程处理较多的访问,可以提高tomcat处理请求的能力。使用方式:
首先。打开/conf/server.xml,增加
- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
- maxThreads="500" minSpareThreads="20" maxIdleTime="60000" />
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="500" minSpareThreads="20" maxIdleTime="60000" />
最大线程500(一般服务器足以),最小空闲线程数20,线程最大空闲时间60秒。
然后,修改<Connector ...>节点,增加executor属性,如:
- <Connector executor="tomcatThreadPool"
- port="80" protocol="HTTP/1.1"
- connectionTimeout="60000"
- keepAliveTimeout="15000"
- maxKeepAliveRequests="1"
- redirectPort="443"
- ....../>
<Connector executor="tomcatThreadPool"
port="80" protocol="HTTP/1.1"
connectionTimeout="60000"
keepAliveTimeout="15000"
maxKeepAliveRequests="1"
redirectPort="443"
....../>
2、java.net.SocketException: Too many open files
当tomcat并发用户量大的时候,单个jvm进程确实可能打开过多的文件句柄。
使用 #lsof -p 10001|wc -l 查看文件操作数
如下操作:
- (1).ps -ef |grep tomcat 查看tomcat的进程ID,记录ID号,假设进程ID为10001
- (2).lsof -p 10001|wc -l 查看当前进程id为10001的 文件操作数
- (3).使用命令:ulimit -a 查看每个用户允许打开的最大文件数
- 默认是1024.
- (4).然后执行:ulimit -n 65536 将允许的最大文件数调整为65536
tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080的更多相关文章
- tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 80
1.INFO: Maximum number of threads (200) created for connector with address null and port 80 说明:最大线程数 ...
- 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 por ...
- The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured
springboot 8080端口被占用报错:The Tomcat connector configured to listen on port 8080 failed to start. The p ...
- 【POI】导出xls文件报错:The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook
使用POI导出xls文件,由于数据过多,导致导出xls报错如下: The maximum number of cell styles was exceeded. You can define up t ...
- LeetCode 414 Third Maximum Number
Problem: Given a non-empty array of integers, return the third maximum number in this array. If it d ...
- Failed to connect to database. Maximum number of conections to instance exceeded
我们大体都知道ArcSDE的连接数有 48 的限制,很多人也知道这个参数可以修改,并且每种操作系统能支持的最大连接数是不同的. 如果应用报错:超出系统最大连接数 该如何处理? 两种解决办法: 第一,首 ...
- The maximum number of cell styles was exceeded. You can define up to 4000 styles
POI操作Excel中,导出的数据不是很大时,则不会有问题,而数据很多或者比较多时, 就会报以下的错误,是由于cell styles太多create造成,故一般可以把cellstyle设置放到循环外面 ...
- iOS---The maximum number of apps for free development profiles has been reached.
真机调试免费App ID出现的问题The maximum number of apps for free development profiles has been reached.免费应用程序调试最 ...
- [LeetCode] Third Maximum Number 第三大的数
Given a non-empty array of integers, return the third maximum number in this array. If it does not e ...
随机推荐
- asp.Net2.0中TextBox设置只读后后台获取不到值的解决方法
http://www.cnblogs.com/yxyht/archive/2013/03/02/2939883.html ASP.NET中TextBox控件设置ReadOnly="tru ...
- SRM 588 DIV1
250 题意:有n首不同的曲子,你唱每首曲子需要花费a的时间以及一个调整的时间b,调整的时间为此首歌的曲调减去上一首歌的曲调的绝对值. 思路:我们用dp[i][k]表示前i首歌只唱k首用的最小时间花费 ...
- 函数响应式编程(FRP)—基础概念篇
原文出处:http://ios.jobbole.com/86815/. 一函数响应式编程 说到函数响应式编程,就不得不提到函数式编程,他们俩有什么关系呢?今天我们就详细的解析一下他们的关系. 现在下面 ...
- Mysql忽略文件名的安全编码
author:skatetime:2014/09/28 mysql如何删除以"#sql-"开头的临时表 现象:在重建索引后,发现Mysql服务器的磁盘空间快满了 在用如下命令重建索 ...
- C# Image 、 byte[] 、Bitmap之间的转化
一.Byte[] 转 System.Drawing.Bitmap public static Bitmap CreateBitmap(byte[] originalImageData, int ori ...
- js中的text(),html() ,val()的区别
js中的text(),html() ,val()的区别 text(),html() ,val()三个方法用于html元素的存值和取值,但是他们各有特点,text()用于html元素文本内容的存取,ht ...
- NET 框架基本原理透析⑵
生成.打包.部署及管理应用程序与类型 要生成就离不开程,序集,程序集是包含一个或多个类型定义文件和资源文件的集合.在程序集包含的所有文件中,有一个文件用于保存清单.清单是另外一组元数据表的集合,其中主 ...
- Java实现堆排序(大根堆)
堆排序是一种树形选择排序方法,它的特点是:在排序的过程中,将array[0,...,n-1]看成是一颗完全二叉树的顺序存储结构,利用完全二叉树中双亲节点和孩子结点之间的内在关系,在当前无序区中选择关键 ...
- jedis例子
@Test public void testDiscoverNodesAutomatically(){ Set<HostAndPort> jedisClusterNode=new Hash ...
- 【转】Ubuntu网卡配置
一.网卡地址配置Ubuntu的网络配置文件是:/etc/network/interfaces1.以DHCP 方式配置网卡 auto eth0 iface eth0 inet dhcp用sudo ...