500错误,因为文件句柄限制了访问量

500错误,因为文件句柄限制了访问量

ulimit -n可以看到默认的1024

ulimit -n 65535 这样可以设置为大些

但重启服务器又变成1024

 

永久性解决办法:

步骤一

/etc/security/limits.conf
在后面加上:
* soft nofile 10240
* hard nofile 20480

步骤二

/etc/pam.d/login
在后面加上
session required pam_limits.so

posted on 2016-11-06 20:37  simon123  阅读(136)  评论(0编辑  收藏  举报

导航