goo blog サービス終了のお知らせ 

NopTea Memo

いろいろなメモ (外部記憶?)

too many open file

2008-09-01 23:34:25 | Linux
tomcatのログに「 too many open file 」と出ておりましたとさ。
tomcat実行ユーザのlimitをみると「descriptors 1024」となってたので
/etc/security/limits.conf に下記追加

user1 hard nofile 2048
user1 soft nofile 2048

で応急対応しつつ調査
最初 lsof -p PID | wc -l とかで見てたけど、どうやらこれは違うかも・・
(descriptors 1024をはるかにオーバー orz)

で、ls -l /proc/PID/fd/ | wc -l で見た方がよいかもということで
また明日調べてみよう。