最大值
[root@localhost logrotate.d]# ulimit -n
 1024
[root@localhost ~]# yum install lsof
[root@localhost ~]# lsof -c nginx |grep -i ipv4
  
nginx   6980   root   10u     IPv4             120277      0t0      TCP *:http (LISTEN)
nginx   6980   root   11u     IPv4             120278      0t0      TCP *:webcache (LISTEN)
nginx   6980   root   24u     IPv4             148622      0t0      TCP *:irdmi (LISTEN)
nginx   7591 nobody   10u     IPv4             120277      0t0      TCP *:http (LISTEN)
nginx   7591 nobody   11u     IPv4             120278      0t0      TCP *:webcache (LISTEN)
nginx   7591 nobody   24u     IPv4             148622      0t0      TCP *:irdmi (LISTEN)
nginx   7592 nobody   10u     IPv4             120277      0t0      TCP *:http (LISTEN)
nginx   7592 nobody   11u     IPv4             120278      0t0      TCP *:webcache (LISTEN)
nginx   7592 nobody   24u     IPv4             148622      0t0      TCP *:irdmi (LISTEN)
永久生效
[root@localhost ~]# vi /etc/security/limits.conf
在配置文件最后面添加2行
* soft nofile 655350
 * hard nofile 655350
重启生效
来源:oschina
链接:https://my.oschina.net/u/3866192/blog/3185002