VPS侦探论坛

标题: 关于"修改打开文件数",军哥进来看看 [打印本页]

作者: yanglingt    时间: 2013-8-8 06:21
标题: 关于"修改打开文件数",军哥进来看看
最近网站502,按照您的这个教程:https://bbs.vpser.net/thread-1654-1-1.html
修改打开文件数,打开php-fpm.conf 找到 rlimit_files 改成:65535
编辑 /etc/security/limits.conf 加上:
* soft nofile 65535
* hard nofile 65535
编辑/etc/sysctl.conf  底部添加fs.file-max=65535

echo "ulimit -SHn 65535" >> /etc/rc.local
重启

重启后输入:ulimit -a查看,怎么还是1024啊?哪里的问题?
作者: licess    时间: 2013-8-8 09:08
/etc/profile里加上ulimit -SHn 65535 这行,再重启看一下
作者: yanglingt    时间: 2013-8-8 19:26
原帖由 licess 于 2013-8-8 09:08 发表
/etc/profile里加上ulimit -SHn 65535 这行,再重启看一下

加这里可以了!那加在/etc/rc.local没用了吗?
作者: licess    时间: 2013-8-8 21:00
/etc/rc.local 那边要保留




欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/) Powered by Discuz! X3.4