Too Many open files troubleshooting

 

 

 

Problem Description: When using netty do performance testing, concurrency caused by too much Too Many open files problem


This class is an error because the number of file handles linux system need to open socket connections is limited when
you can see through ulimit -a

Set the number of handles
ulimit -n 10000 [temporary settings]
to modify limit.conf file
sudo vim /etc/security/limits.conf
add
* soft nofile 10000 [when more than a specified number of alarms Soft]
* Hard nofile 10000 [Hard true value of]

View the process open handles
lsof -n | awk '{print $ 2}' | uniq -c | sort -nr

Number of socket connection statistics specify the port
netstat -ant | grep 'port' | wc -l

Guess you like

Origin www.cnblogs.com/htkj/p/10932537.html