Logsize issue

Discussion in 'General' started by cryptic, Nov 6, 2007.

  1. cryptic

    cryptic Member

    Last week I set the logsize on a site to 5MB, still today the web.log file is 24MB. Any way to fix this or am I just not understanding logsize and how it works?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check your sysleog if you have any cron errors. The logfile size is checked by the script /root/ispconfig/scripts/shell/webalizer.php
     
  3. cryptic

    cryptic Member

    There are no errors. The cron log shows the webalizer.php running as it should.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I have no other Idea. I added this thread to the bugtracker, maybe there is something wrong with the webalizer.php script. But as far as I can see, it works on my servers.
     
  5. wpwood3

    wpwood3 New Member

    Logsize is a problem

    I am seeing a problem with web.log size too.
    These are the logs located in

    /var/www/web2/log/2007/11
    /var/www/web2/log/2007/12

    My November web.log is 3.8GB
    My December log is already 1.5GB

    I have logsize set to 5 in ISP Manager but it doesn't seem to matter.

    There are no errors in the cron log to indicate a problem with webalizer:
    Code:
     
    Dec  9 04:00:01 server1 crond[16814]: (root) CMD (/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null)
    
     
  6. wpwood3

    wpwood3 New Member

    I have 2 ISPConfig servers. One is CentOS 5.1 32-bit the other is 64-bit.
    Both of them have this logsize problem with web.log.

    Is there a patch to fix this?
     
  7. falko

    falko Super Moderator Howtoforge Staff

    We'll check that - I've added it to our bugtracker.
     
  8. cryptic

    cryptic Member

    This has become a huge issue for us. I just had to delete a 31 GB error.log which brought a site down. Is there anything else that can be done?
     
  9. wpwood3

    wpwood3 New Member

    This is a problem!

    Same here... :mad:

    I'm having to monitor log size and manually delete them when they get over 5 GB. My logs are bigger than my webs!
     
  10. falko

    falko Super Moderator Howtoforge Staff

    We haven't had the time yet to check this, but be assured that we will. :)
     
  11. Hawker

    Hawker New Member

    Falko,

    I don't know if this will help or not...

    I'm running 2.2.16 on an FC3 box and the log files are being kept to size.

    I was never able to upgrade to 2.2.17 or 2.2.18 because of errors during the upgrade.
     
    Last edited: Dec 29, 2007
  12. wpwood3

    wpwood3 New Member

    Just an observation...

    It appears that my logfile in log/2007/12/ was deleted by the webalizer script when it created log/2008/01/. The old log file was well above 6GB at that time.

    The new logfile in log/2008/01/ is already 200MB even though I have set the max size in ISPConfig to 5MB.

    I found it interesting that the old logfile was indeed deleted. It almost seems like the webalizer script is unable to delete the logfile if the file is in use.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    The webalizer script deletes all files except the current web.log file. I will see if I can add a additional switch to enable the deletion of all files if the site is over quota.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    My prior post wasnt correct.

    I have tested this now in 2.2.18 and all log files were deleted correctly, even the current logfiles when it exceeds the quota.
     
  15. wpwood3

    wpwood3 New Member

    Have you tested on CentOS 5.0 or 5.1?

    I have 2 servers and both of them have the same problem with the logfile size.
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    The linux distribution makes no difference as the script is the same for all distributions. If you want to debug the function on your server, have a look in the script /root/ispconfig/scripts/lib/webalizer.php. You can start the script manually with the command:

    /root/ispconfig/php/php -q /root/ispconfig/scripts/lib/webalizer.php
     
  17. wpwood3

    wpwood3 New Member

    Log file still too large after manual run

    On my system webalizer.php is in /root/ispconfig/scripts/shell/webalizer.php
    Should I move it to lib?

    I ran /root/ispconfig/php/php -q /root/ispconfig/scripts/shell/webalizer.php
    and got the following results:
    Code:
     
    [root@centos5 shell]# /root/ispconfig/php/php -q /root/ispconfig/scripts/shell/webalizer.php
    Warning: Truncating oversized referrer field
    Warning: Truncating oversized referrer field
    Warning: Truncating oversized referrer field
    Warning: Truncating oversized request field
    Warning: Truncating oversized request field
    Warning: Truncating oversized request field
    Warning: Truncating oversized request field
    Warning: Truncating oversized request field
    2826474 records (2826465 ignored) in 468.50 seconds, 6033/sec
    [root@centos5 shell]#
    
    Running webalizer did not change the log file /var/www/web2/log/2008/01/web.log . It is still 739MB which is way over the limit I set in ISPConfig.

    Any other ideas?
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    No, thats fine. I posted the wrong path.

    The run above does not contained any errors. You will have to debug the script if you want to get more details why it fails on your server.
     
  19. wpwood3

    wpwood3 New Member

    What about php 5.1.6 ?

    I recognize that but, CentOS 5 uses php 5.1.6. I know from experience that some of my php scripts that worked fine with FC3 and php 4.3.9 stopped working when I moved them to CentOS 5. Have you tested the webalizer.php script with php 5.1.6?

    I did some debugging yesterday but have not found the answer yet. :(
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    The webalizer script uses the ispconfig php if you executed the command that I posted above and the ispconfig php should be the same on all ispconfig installations.

    I created a extended webalizer.php with debugging code included. Please replace your webalizer.php with the webalizer.php file which is inside the attached .zip file. Then run it manually with the command mentioned above and post the output.
     

    Attached Files:

Share This Page