Too many open files when several hundred domains in Plesk

With more than several hundred domains in plesk, issues can arise with too many open
files. Solution:

echo ‘ulimit -n 32768′ >> /etc/sysconfig/httpd

Enabling piped logging his also helps greatly,:

mysql -uadmin -p$(cat /etc/psa/.psa.shadow) -BAND psa -e ‘REPLACE INTO
misc VALUES (“apache_pipelog”,”true”)’
/usr/local/psa/admin/bin/websrvmng -a

To see the default open file limit per process:

ulimit -n

Too see how many open files are on the system:
ls -1 /proc/$(cat /var/run/httpd.pid)/fd | wc -l

or more accurate:
lsof -p $(cat /var/run/httpd.pid) | wc -l

You can leave a response, or trackback from your own site.

Leave a Reply