尝试在高负载Web服务器上获得相当于ulimit -n 20000的性能,但是Ubuntu上的/etc/security/limits.conf似乎并不坚持。
这是我在configuration文件中设置的。
root soft nofile 20000 root hard nofile 20000 www-data soft nofile 20000 www-data hard nofile 20000
我也试过了
* soft nofile 20000 * hard nofile 20000
重新启动后,当我运行ulimit -n在根,或www数据或我的普通用户,我仍然看到默认的1024。
您可能需要从/etc/pam.d(cron,su,sudo,sshd,login)下的不同文件中取消注释pam_limits.so,
session required pam_limits.so