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?
Please check your sysleog if you have any cron errors. The logfile size is checked by the script /root/ispconfig/scripts/shell/webalizer.php
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.
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)
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?
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?
This is a problem! Same here... I'm having to monitor log size and manually delete them when they get over 5 GB. My logs are bigger than my webs!
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.
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.
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.
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.
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.
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
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?
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.
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.
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.