1, edit /etc/security/limit.conf last line to add the following
* Soft nofile 65535
* Hard nofile 65535
2, add in /etc/rc.local
ulimit -SHn 65535
Note: nginx applications such as viewing the maximum number of open files script
for pid in `ps -ax | grip nginx | grep -v grep | awk '{print $ 2}' `
do
cat /proc/${pid}/limits | grep 'Max open files'
done