Application server-Tomcat
1. Configuration file: vi / usr/local/tomcat7/conf/server.xml
two。 Launch: cd / usr/local/tomcat7/bin sh startup.sh
3. Log: cd / usr/local/tomcat7/logs tail-f catalina.out
4. View the log while starting:
/ usr/local/tomcat7/bin/startup.sh & tail-f / usr/local/tomcat7/logs/catalina.out
5. Kill the process: ps-ef | grep java kill-9 pid
6. Monitor and control
Cd / usr/local/tomcat7/conf vi tomcat-users.xml
Complete configuration, save, restart tomcat
Then visit the tomcat page
Enter the configured user name and password to enter the page
7. Parameter optimization
Basically, which resource types need to be compressed in vi / usr/local/tomcat7/conf/server.xml?
Adjust the maximum number of concurrent connections in tomcat (focus)
Error message: org.apache.tomcat.util.threads.ThreadPool logFull SERVER: ALL threads (250) are currently busy,waiting. Increase maxThreads (250) or check the servlet status
MaxThreads: for more information on how big the setting is, you can refer to Current thread count in the tomcat page / server status page, which is at least larger than this.
AcceptCount: when the number of requests is large, some requests that cannot be processed in time will be crammed into acceptCount. When acceptCount is full, the request will be discarded and the connection rejected error will be reported. If it is Nginx, it will report 502error. These two linkage configurations. Reference https://my.oschina.net/weiweiblog/blog/3040849
8. What are the aspects of tuning tomcat
Hardware
Operation mode
Parameters (including tomcat parameters, JVM parameters)
JDK version
Deployment mode (with other combinations, learning from each other's strengths to offset their weaknesses)