Maximum number of threads (200) created for connector with address null and port 9999
2013-08-14 18:26
549 查看
1、INFO: Maximum number of threads (200) created for connector with address null and port 8091
说明:最大线程数错误
解决方案:
使用线程池,用较少的线程处理较多的访问,可以提高tomcat处理请求的能力。使用方式:
首先。打开/conf/server.xml,增加
<Executorname="tomcatThreadPool"namePrefix="catalina-exec-"
maxThreads="2500"minSpareThreads="20"maxIdleTime="60000"/>
最大线程500(一般服务器足以),最小空闲线程数20,线程最大空闲时间60秒。
然后,修改<Connector ...>节点,增加executor属性,如:
<Connectorexecutor="tomcatThreadPool"
port="9999"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处理请求的能力。使用方式:
首先。打开/conf/server.xml,增加
<Executorname="tomcatThreadPool"namePrefix="catalina-exec-"
maxThreads="2500"minSpareThreads="20"maxIdleTime="60000"/>
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="500" minSpareThreads="20" maxIdleTime="60000" />
最大线程500(一般服务器足以),最小空闲线程数20,线程最大空闲时间60秒。
然后,修改<Connector ...>节点,增加executor属性,如:
<Connectorexecutor="tomcatThreadPool"
port="9999"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 8080
- 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 8080
- 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 8080
- tomcat报错INFO: 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 8080
- tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080
- 线上问题排查:Maximum number of threads (1000) created for connector with address null and port 9502
- 解决:Maximum number of threads (200) created for connector with address null
- tomcat调优方案Maximum number of threads (200) created for connector with address null and port 8091
- tomcat调优方案Maximum number of threads (200) created for connector with address null and port 8091
- Kettle解析JSON错误,We MUST have the same number of values for all paths,We can not find and data with path [$.
- LINUX AND THE MAXIMUM NUMBER OF PROCESSES (THREADS)
- The maximum number of apps for free development profiles has been reached
- SUSE修改密码出现“passwd: Have exhausted maximum number of retries for service”
- [Graphics] UIColor created with component values far outside the expected range, Set a breakpoint on UIColorBreakForOutOfRangeColorComponents to debug. This message will only be logged once.
- Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -
- 严重: A web application created a ThreadLocal with key of type [null] (value [com.sun.faces.config.Con