tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080
2012-12-04 14:23
453 查看
1、INFO: Maximum number of threads (200) created for connector with address null and port 8091
说明:最大线程数错误
解决方案:
使用线程池,用较少的线程处理较多的访问,可以提高tomcat处理请求的能力。使用方式:
首先。打开/conf/server.xml,增加
最大线程500(一般服务器足以),最小空闲线程数20,线程最大空闲时间60秒。
然后,修改<Connector ...>节点,增加executor属性,如:
2、java.net.SocketException: Too many open files
当tomcat并发用户量大的时候,单个jvm进程确实可能打开过多的文件句柄。
使用 #lsof -p 10001|wc -l 查看文件操作数
如下操作:
说明:最大线程数错误
解决方案:
使用线程池,用较少的线程处理较多的访问,可以提高tomcat处理请求的能力。使用方式:
首先。打开/conf/server.xml,增加
<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" ....../>
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 大并发报错 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
- Maximum number of threads (200) created for connector with address null and port 9999
- 线上问题排查: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
- Tomcat6集成Red5后,关闭时报错The web application [] created a ThreadLocal with key of type [null]的解决方法
- LINUX AND THE MAXIMUM NUMBER OF PROCESSES (THREADS)
- Kettle解析JSON错误,We MUST have the same number of values for all paths,We can not find and data with path [$.
- JBWEB002004: More than the maximum number of request parameters (GET plus POST) for a single request
- iOS---The maximum number of apps for free development profiles has been reached.
- A web application created a ThreadLocal with key of type [null]
- Tomcat starting even after port is in use(Address already in use), 即使connector端口被占用也会继续启动.