ISPConfig Logfiles (2147483647 bytes)

Discussion in 'General' started by ISPConfigFan, May 22, 2007.

  1. ISPConfigFan

    ISPConfigFan New Member

    Good evening,

    For an online game ISPConfig is used on 3 servers that host the website. We have recently switched from Plesk to ISPConfig while using a perfect fedora 6 setup how-to. ISPConfig gave us all we need to simply configure a mini-network with basic functions as mail, ftp, vhosts, etc. First of all, thank you (falko & till i believe; wadering around these forums) for developing such a great, and free, tool!

    Now let me excuse myself for writing a complete paper about it, but i think forums are the best tool on the internet and just want to give people with the exact same problem a little hand. :D

    One of the servers is used as database, one for serving dynamic content and one for static content. We have over 5 million hits a day now on the webserver and (big guess) even more on the static. The only problem we encouter is the logfile management of ISPConfig, or how it works. I think that because not many people use it for the same purpose as we do i have not been able to find a solution to our problem here nor on other websites.


    The Problem
    Static content sometimes took long to load. top showed 25.0+ sometimes while the average cpu usage was never higher then 15%.
    Also logfiles where filling up the disk (todays logfile reached 2.1 gig at 20:57

    We have stopped all logging through apache (done in httpd.conf) on the static server and disabled Webalizer through ISPConfig.
    This solved the problem of the disk being full but still 2 logfiles are 'active':
    the one called before that reached 2147483647 bytes at 20:57our, which is called ispconfig_access_log_2007_05_21.
    The other one is the same file, but from the day before.

    Because we were monitoring the website performance we noticed an enormous increase of cpu usage in top around 20:50 this evening... At the same time the logfile 'stopped' because the time of last change did not increase.
    Looking at the dir list i noticed the two logfiles being exact the same size!

    Code:
    -rw-r--r-- 1 root root 2147483647 May 20 18:17 ispconfig_access_log_2007_05_20
    -rw-r--r-- 1 root root 2147483647 May 21 20:57 ispconfig_access_log_2007_05_21
    
    Next thing on my mind is: "the number of bytes of that file is too big, something can't handle it"...
    same thing happens if you try to put a larger integer in a mysql field with the 'int' as type: it will be lowered to 2.1 billion.
    also, logfiles bigger than 2gigabytes will not be handled by PHP, but this causing the problem didn't make any sense in my mind since PHP got nothing to do with it.

    So i do

    Code:
    echo '' > ispconfig_access_log_2007_05_21
    and voila: logfile increases again starting from zero, average 'load' in top drops to 0.2 and website is served flawless with maximum visitors online.

    Questions to solve the problem
    If i'm not mistaking the logfile i'm talking about is for logging the datatraffic for the ISPConfig panel. The files are useless to us anyway because we use the main webserver for basic visitor stats, they clearly waste a lot of disk and cpu performance, we only host 1 website and they now give us a problem as well... :eek:

    Is there any way to stop the use of the ispconfig_access_log_2007_*_* files in /var/log/httpd/ ?

    More interesting for other people is the question, what is causing this problem?

    I hope i have made myself clear enough :D
    Looking forward to any reply.

    Thanks in advance,

    the ISPCofigFan
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The logfiles you are talking about are the logfiles of the main webserver and not of the ISPConfig webserver.

    The problem is caused by the fact that the php programming language is not able to open files > 2 GB. There is a documented switch to compile php for file support > 2 GB, but we tested it and it does not work on most linux distributions so we can not use this.

    If you want to remove the logging, which will disable all web statistics in ISPConfig, remove the web log and webalizer scripts from the root crontab and the log line that logs trough cronolog in your apache configuration file (it is the custom log directive at the end of the file where ISPConfig inserted some lines).
     
  3. ISPConfigFan

    ISPConfigFan New Member

    Thanks!

    Commenting out the ISPConfig line in the apache did the trick and stopped the use of the logfile.

    Too bad though that it is PHP again that causes this mess. Daily logfiles of the webserver reach about 1.7gig and i assume they will give the same problem when they reach 2 gig.

    We never had these problems on Plesk, with daily log rotation... maybe it's interesting to find out how their logsystem works because i can imagine others who use ISPConfig as well find this error very annoing.

    Thanks again for your time.
     
  4. phamels

    phamels Member

    *bump* :)

    Say I also have this problem (Web log files over 2Gb) and I do wish to have web stats (webalizer) for this specific site... How do I solve this ?

    - Do I try to compile php with support to handle files > 2GB and risk running into even bigger trouble :p
    - Or ... there's this magic method I haven't heard of yet or overlooked which just popped into your head and wish to share with me thank you very much for that BTW :) (Too much coffee)

    It's a very busy site with ~40.000 unique visits / day and stats would come in handy :D

    Thx in advance...
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    This is a rather old thread, it is already solved in ISPConfig 2.2.23.
     
  6. phamels

    phamels Member

    Oh ok :)

    It's a relative new server (35 days old).
    I am running this site on version 2.2.21, so that explains :)

    Now if I would update to 2.2.23, will that solve my problem without losing any apache log data?


    Thx for the very quick reply btw !
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    As far as I know, the solution is implemented as log rotation, so it might be that you loose logfile data if the file is already too large and the stats have not been processed.
     
  8. phamels

    phamels Member

    Well, the file /var/www/webx/log/2008/04/web.log = 2147483647 bytes as the topic states and stopped growing since a few days... So i suppose/hope that it wil nicely split up after the update and that the logging may continue with hopefully some recovery of the /var/log/httpd files that haven't been parsed yet :)

    I will just try to update after making some backup of the logs i allready have at hand.
     

Share This Page