• The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Keep getting: "too many open files in system"

R

ranageman

Guest
Repeatedly, my system gets into a state with apparently too many open files. At worst, I can no longer ssh:

-bash: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: Error 23

Then I have to restart the VPS to recover.

sysctl -a says:
fs.file-max = 131072

ulimit -n says:
1024

This is a very lightly loaded system, with 4 domains running mail, one Typo3 webserver (again, no big load) and some Perl/CGI.

How can I find out what process has the excessive file opens?

Cheers
 
You can give lsof and a few shell commands a shot...

By PID, first column is count, second is pid...

lsof -Pn |sed "s/^[^ ]* *\([^ ]*\) .*$/\1/" |sort |uniq -c |sort -n -r |less

1047 19531
142 14378
142 14377
142 14003
142 14002
142 14001
142 14000
142 13999
142 13998
142 13997
142 13996
141 1681
105 3063
84 1024

By user, first column is count, second is user...

lsof -Pn |sed "s/^[^ ]* *[^ ]* *\([^ ]*\) .*$/\1/" |sort |uniq -c |sort -n -r |less

1420 apache
1234 mysql
1005 root
789 oracle
139 postgres
96 wagnerch
84 tomcat
66 postfix
63 dovecot
35 named
26 ntp
15 nobody
14 xfs
11 daemon
1 USER


Keep in mind that ulimit is limited to your shell and all programs started by it. Either way, this should help identify where file handles are leaking.
 
Thanks for the tip! Right now, the problem seems to have gone away (no reboot or anything) and it looks like this:

1635 mysql
600 apache
594 root
180 named
174 psaadm
65 drweb
55 popuser
54 ranagedk
17 qmaild
14 qmails
8 qmaill
7 qmailr
7 qmailq
1 USER

I guess I will have to try and catch the system while its unstable (but will let me log in!) and try again.
 
I would bet you are hitting the system limit, and I would also suspect your issue is going to be the Apache user. More than likely you have a php/mod_perl or some other webapp that is leaking file handles. Since php and mod_perl both run inside of Apache the resources are never freed.
 
Back
Top