ITPub博客

首页 > 应用开发 > IT综合 > su: /bin/bash: Too many open files in system错误

su: /bin/bash: Too many open files in system错误

原创 IT综合 作者:tonykorn97 时间:2008-05-20 10:48:33 0 删除 编辑

切换到oracle的时候出错:
[root@test ~]# su - oracle
su: /bin/bash: Too many open files in system
[root@test ~]#

[@more@]


下面只说解决成功的过程
[root@test ~]# cat /proc/sys/fs/file-max
512
[root@test ~]#

发现文件限制数太少

查看/etc/sysctl.conf发现:

fs.file-max = 512 * PROCESSES

这个直接按照oracle的安装说明复制粘贴上去了,没有改动,修改为:

kernel.sem=1055 32000 100 128
kernel.shmmax=2147483648
kernel.shmall = 2097152
net.ipv4.tcp_sack = 0
net.ipv4.tcp_timestamps = 0
net.ipv4.conf.default.rp_filter = 0
net.core.optmem_max = 65535
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 262144
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000


运行:
[root@test ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
kernel.sem = 1055 32000 100 128
kernel.shmmax = 2147483648
kernel.shmall = 2097152
net.ipv4.tcp_sack = 0
net.ipv4.tcp_timestamps = 0
net.ipv4.conf.default.rp_filter = 0
net.core.optmem_max = 65535
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 262144
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
[root@test ~]# cat /proc/sys/fs/file-max
6553600
[root@test ~]#


然后就可以切换过去了


还有一种方法,
echo "10240" >/proc/sys/fs/file-max
重启后就失效了。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/312079/viewspace-1004304/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 安装oracle11g报错
请登录后发表评论 登录
全部评论

注册时间:2007-12-05

  • 博文量
    1854
  • 访问量
    2088287