In Tomcat server. XML, there are similar:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxSpareThreads="750" maxThreads="1000" minSpareTHreads="50" acceptCount="1000" maxProcessors="1000" URIEncoding="gbk" useBodyEncodingForURI="true"/>
Configuration, where:
Acceptcount = "1000" Maximum number of accepted connections
Maxprocessors = "1000" Maximum number of active threads
Port = "8080" service port
Protocol = "HTTP/1.1" service protocol
Connectiontimeout = "20000" timeout time in MS
When the redirectport = "8443" redirection port requires secure communication, the customer request will be forwarded to the SSL redirectport
Maxthreads: the maximum number of threads that can be created by Tomcat. Each thread processes a request. maxthreads determines the maximum thread threshold value of Tomcat.
Minsparethreads: Minimum number of backup threads and number of initialization threads at Tomcat startup;
Maxsparethreads: Maximum number of standby threads. Once the created thread exceeds this value, Tomcat will close socket threads that are no longer needed;
Uriencoding = "GBK" sets the default transcoding format of Tomcat
View the instructions for $ tomcat_home/webapps/tomcat-docs/config/http.html, which are described as follows:
Uriencoding: This specifies the character encoding used to decode the URI bytes, after % XX decoding the URL. if not specified, ISO-8859-1 will be used. that is to say, if you do not set uriencoding, Tomcat by default is based on the ISO-8859-1 URL Decoding, ISO-8859-1 does not include Chinese characters, so the Chinese characters must not be correctly parsed.
How can I check the number of connections of current tomcat?
Assume that two Tomcat instances are enabled on the server, listening to ports 8040 and 8050 respectively.
Netstat-Na | grep estab | grep 8040 | WC-l
Netstat-Na | grep estab | grep 8050 | WC-l
The sum of the two is the number of connections to all Tomcat servers.