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

3540阅读 0评论2016-03-21 levy-linux
分类:系统运维

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

业务日志中出现报错
su: /bin/bash: Too many open files in system
--这里报错,说打开的文件太多

--解决方法(增加最大打开文件数的限制,当然最好是自己能控制好这个数量,要不机器性能也不行)
[root@tmp ~]# cat /proc/sys/fs/file-max
65536

[root@tmp ~]# vi /etc/sysctl.conf
修改fs.file-max = 6553600

[root@tmp~]# sysctl -p
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.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
[root@tmp~]# cat /proc/sys/fs/file-max
6553600
然后就可以正常启动服务了

上一篇:Python XML No module named etree.ElementTree
下一篇:azkaban任务报错java.lang.RuntimeException: The root scratch dir: /tmp/hive