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

原文地址:https://www.cnblogs.com/simon123/p/6036281.html