#1  
Old 12th September 2010, 14:00
Andreas0815 Andreas0815 is offline
Junior Member
 
Join Date: Jun 2010
Posts: 27
Thanks: 0
Thanked 2 Times in 2 Posts
Default Logrotate error.log

Hi!

Logrotate for Websites access.log works fine but error.log doesn't rotate.

How to change this?

Thank you!

EDIT: Found the solution here: Upgrade to 3.0.3 Beta.

Last edited by Andreas0815; 12th September 2010 at 14:04.
Reply With Quote
Sponsored Links
  #2  
Old 16th September 2010, 19:58
Andreas0815 Andreas0815 is offline
Junior Member
 
Join Date: Jun 2010
Posts: 27
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Well... the error.log rotation still don't work on 3.0.3 beta
Reply With Quote
  #3  
Old 16th September 2010, 21:04
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,771
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

On my server the error.log gets rotated when it exceeds 10 MB in size. Maybe you have commented out the cron_daily.sh cronjob in the root crontab on your server?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 16th September 2010, 21:54
Andreas0815 Andreas0815 is offline
Junior Member
 
Join Date: Jun 2010
Posts: 27
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hi Till,

the error.log is more than 60MB. I didn't comment anything out and the access.log rotation works fine...
Reply With Quote
  #5  
Old 17th September 2010, 15:09
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,771
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

I've just tested the rotation of the website error.log by creating a 11 MB error.log file and then running the cron_daily.sh script with the current SVN version and it worked on my test server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 3rd October 2010, 11:47
Andreas0815 Andreas0815 is offline
Junior Member
 
Join Date: Jun 2010
Posts: 27
Thanks: 0
Thanked 2 Times in 2 Posts
Default

With 3.0.3 RC it still don't work

Here is my /usr/local/ispconfig/server/cron_daily.sh:
Code:
#!/bin/sh

PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin

/usr/bin/php -q /usr/local/ispconfig/server/cron_daily.php
So nothing is commented out.
The error.log is in located at /var/www/clients/clientX/webY/log/error.log, like the access.log. For the access.log the rotation works fine, like I wrote.

What am I doing wrong?
Reply With Quote
  #7  
Old 29th October 2010, 11:18
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Default error.log

You seem to be correct Andreas.
/usr/local/ispconfig/server/cron_daily.php does not have anything in it for error.log.

We had to add this in a cron job to handle error logging with one of our Heavy Duty sites.

00 09 * * 0 /bin/cat /dev/null > /var/www/HEAVY-DUTY-SITE/log/error.log


The 400M error.log was killing the whole servers network connectivity


And then the phones started ringing in the middle of the night.
- Sam
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent


Last edited by SamTzu; 29th October 2010 at 11:23.
Reply With Quote
  #8  
Old 29th October 2010, 14:34
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,771
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

Then you dont run ISPConfig 3.0.3. From cron_daily.php ispconfig 3.0.3 line 222:

Code:
// rotate and compress the error.log when it exceeds a size of 10 MB
	$logfile = escapeshellcmd($rec['document_root'].'/log/error.log');
	if(is_file($logfile) && filesize($logfile) > 10000000) {
		exec("gzip -c $logfile > $logfile.1.gz");
		exec("cat /dev/null > $logfile");
	}
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 30th October 2010, 18:38
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
 
Default

You are right. That particular server was older version.
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 error.log problem Quissi Server Operation 2 18th September 2009 15:04
Server crashed by unlimited error.log size - how to set a limit? tom Installation/Configuration 16 22nd April 2008 12:16
Not writing to error.log Hotwire General 6 7th June 2007 21:16
webalizer and logrotate damaskinos Server Operation 4 24th November 2005 23:16
logrotate Ovidiu General 1 12th October 2005 12:28


All times are GMT +2. The time now is 03:22.


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