设置系统最大句柄数:
/etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
查看最大句柄数 ulimit -n
设置客户端最大句柄数 ulimit -n 10000
启动tomcat后查看进程号 ps aux|grep tomcat
tomcat后查看tomcat日志 tail -f catalina.out
根据进程号查询对应的句柄数 lsof -n|awk '{print $2}'|sort|uniq -c |sort -nr|grep 4935
查找端口连接数 netstat -nat|grep -i "22223"|wc -l
根据端口杀掉进程 kill -9 $(netstat -tlnp | grep 22223| awk '{print $7}' | awk -F '/' '{print $1}')
/etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
查看最大句柄数 ulimit -n
设置客户端最大句柄数 ulimit -n 10000
启动tomcat后查看进程号 ps aux|grep tomcat
tomcat后查看tomcat日志 tail -f catalina.out
根据进程号查询对应的句柄数 lsof -n|awk '{print $2}'|sort|uniq -c |sort -nr|grep 4935
查找端口连接数 netstat -nat|grep -i "22223"|wc -l
根据端口杀掉进程 kill -9 $(netstat -tlnp | grep 22223| awk '{print $7}' | awk -F '/' '{print $1}')