Huge number openned log files

Discussion in 'General' started by Ventzy, Nov 7, 2012.

  1. Ventzy

    Ventzy New Member

    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?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  3. Ventzy

    Ventzy New Member

    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.
     

Share This Page