1, info:maximum number of threads ($) created for connector with address null and port 8091
Description: The maximum number of threads is wrong
Solution:
Using a thread pool to handle more access with fewer threads can improve the ability of Tomcat to process requests. How to use:
First of all. Open/conf/server.xml, add
- <Executor name="Tomcatthreadpool" nameprefix="catalina-exec- "
- maxthreads= "minsparethreads=" maxidletime= " 60000" />
<executor name= "Tomcatthreadpool" nameprefix= "catalina-exec-" maxthreads= "$ " minsparethreads= "20" Maxidletime= "60000"/>
Maximum thread 500 (general server sufficient), minimum number of idle threads 20, maximum thread idle time 60 seconds.
Then, modify the <connector ...> node to add executor properties, such as:
- <Connector executor="Tomcatthreadpool"
- port= "protocol=" http/1.1 "
- connectiontimeout="60000"
- keepalivetimeout="15000"
- maxkeepaliverequests="1"
- redirectport="443"
- ...... />
<connector executor= "Tomcatthreadpool" port= " " protocol= "http/1.1" connectiontimeout= "60000" keepalivetimeout= "15000" maxkeepaliverequests= "1" redirectport= "443" ....../>
2. Java.net.SocketException:Too Many open files
When Tomcat has a large concurrent user volume, a single JVM process may indeed open too many file handles.
Use #lsof-P 10001|wc-l to view file operands
Do the following:
- (1). Ps-ef |grep Tomcat View Tomcat's process ID, record ID number, assuming process ID is 10001
- (2). lsof-p 10001|wc-l View the current number of file operands with process ID 10001
- (3). Use the command: Ulimit-a to see the maximum number of files allowed to open per user
- The default is 1024.
- (4). Then execute: ulimit-n 65536 to adjust the maximum allowable number of files to 65536
Tomcat Big concurrency error Maximum number of threads ($) created for connector with address null and port 8080