Too many open files故障解决一例

Linux环境WebSphere输出日志:

[5/10/17 2:38:12:697 EDT] 000090b7 SystemErr     R Caused by: java.io.FileNotFoundException: /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/appsrv01Cell01/bcsa_war.ear/bcsa.war/medias/9c5bbab96a3843db9fdcc94e8ef928dc/f66642f4555dc9e701555deaea00000d_SCORM/content/course/sco05/end.swf (Too many open files)

报出:Too many open files错误。

使用ulimit -a命令查看配置信息:

[root@appsrv01 server01]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 135168
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 135168
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

发现open files参数配置为1024,修改为65535。

修改/etc/profile配置文件,在该文件中追加“ulimit -n 65535”

重新登录后查看最新配置:

[root@appsrv01 bin]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 135168
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65535
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 135168
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
原文地址:https://www.cnblogs.com/xusweeter/p/6853783.html