HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Huge number openned log files (http://www.howtoforge.com/forums/showthread.php?t=59456)

Ventzy 7th November 2012 14:56

Huge number openned log files
 
I have got "Too many open files" error on my server and after checking lsof I found huge number opened files for error logs.

Code:

lsof | grep /var/log/ispconfig | wc -l
150582

The server have ~ 1200 virtual hosts.
One line looks like this
Code:

COMMAND    PID      USER  FD      TYPE            DEVICE    SIZE/OFF      NODE NAME
apache2  30294  www-data  615w      REG              251,0    3276350  10237337 /var/log/ispconfig/httpd/myhost/error.log

and there are ~ 150 lines like this for single vhost.

What could cause this?

till 7th November 2012 15:14

Apache opens a file handle for each error.log file of the vhosts.

There are two options:

a) Increase the max open file handles in your server.
b) comment out the error.log directive in the apache vhost template in /usr/local/ispconfig/server/conf/ and resync all vhosts. This will disable the individual error logging for the vhosts.

Ventzy 7th November 2012 15:28

Thanks, we will consider the options. But is it normal to have 150 opened handles for a single log file? It seems huge number to me.


All times are GMT +2. The time now is 04:48.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.