tomcat报错INFO: Maximum number of threads (200) created for connector with address null and port 8080
2013-08-10 20:32
627 查看
一、发现问题
INFO: Maximum number of threads (200) created for connector with address null and port 8080
说明:最大线程数错误
解决方案:使用线程池,用较少的线程处理较多的访问,可以提高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" />
三、linux中查看文件操作数
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
原帖地址:/article/2461964.html
相关文章推荐
- 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 大并发报错 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
- 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 [$.
- Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -
- RMAN-06025: no backup of archived log for thread X with sequence Y and starting SCN of Z found to re
- <Socket> <BEA-000402> <There are: 5 active sockets, but the maximum number of socket reader threads
- SUSE修改密码出现“passwd: Have exhausted maximum number of retries for service”
- VMware排错:Number of virtual devices exceeds the maximum for a given controller