首页 > 其他 > 详细

limits.conf设置引起的常见错误

时间:2016-10-12 14:22:10      阅读:604      评论:0      收藏:0      [点我收藏+]

错误1:

bash: fork: retry: Resource temporarily unavailable

解决方法:

[root@localhost ~]# vim /etc/security/limits.conf
*                soft    nofile          65535
*                hard    nofile          65535
www              soft    nproc           500
www              hard    nproc           500
注:退出secureCRT,重新登录即可

错误2:

-bash: redirection error: cannot duplicate fd: Invalid argument

解决方法:

[root@localhost ~]# vim /etc/security/limits.conf
*                soft    nofile          65535
*                hard    nofile          65535
www              soft    nofile          6000
www              hard    nofile          6000
注:退出secureCRT,重新登录即可

错误3:

su: cannot set user id: Resource temporarily unavailable

解决方法:

[root@localhost ~]# cat /proc/sys/fs/file-max      #<--指定了系统范围内所有进程可以打开的文件句柄的数量限制
6815744
[root@localhost ~]# cat /proc/sys/fs/file-nr            #<--整个系统目前使用的文件句柄数量,其中第一个值已经分配的文件句柄,第二值为已经分配但没有使用的文件句柄,在kernel2.6版本第二项值总为0,表示无一浪费都已经被使用,第三个值是句柄总数
22528   0       6815744
[root@localhost ~]# vim /etc/security/limits.conf
*                soft    nofile          65535
*                hard    nofile          65535
www              soft    nofile          6000
www              hard    nofile          6000
www              soft    nproc           500
www              hard    nproc           500


limits.conf设置引起的常见错误

原文:http://stuart.blog.51cto.com/728677/1861054

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!