log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Prizes for Wakefield Show announced (News:)
- Heretic update from R-Comp (News:)
- Wakefield Show 2024 is next Saturday (News:)
- Git client updated to 0.07 (News:2)
- Archive Edition 27:1 reviewed (News:)
- Rougol April 2024 meeting on monday is Anniversary time (News:1)
- WROCC April 2024 meeting o...changes to our phone lines (News:1)
- April developer 'fireside' chat is on saturday night (News:)
- March 2024 News Summary (News:4)
- WROCC Newsletter Volume 41:11 reviewed (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Site Comments: Check stats and logs
 
  Check stats and logs
  rich (12:10 2/7/2006)
 
Richard Goodwin Message #77262, posted by rich at 12:10, 2/7/2006
Rich
Dictator for life
Posts: 6827
Woo to folks with web sites hosted here,

One of the things that bugged me about the server was that, when it rotated the logs, it basically made the web server unavailable for about half an hour. Now true, this is about 4:30am on a Sunday morning, but hardly optimal, and a bit scary when you see "Server down!" emails for the fist time.

The problem was that this is the default web log rotation as set up when I installed the server:
/virtual/www.acornarcade.com/weblogs/access_log /virtual/www.acornarcade.com/weblogs/error_log {
missingok
weekly
prerotate
ADVXctl closelogs
endscript
postrotate
ADVXctl closelogs
endscript
}
...which I just copied for each of the virtual hosts (of which there are now many). ADVXctl seems to be the same as apachectl, and closelogs restarted apache.

I took a look at the man pages, and came up with this:

/virtual/www.*/weblogs/*_log {
missingok
weekly
rotate 5
copytruncate
delaycompress
sharedscripts
prerotate
date
endscript
postrotate
apachectl graceful
date
endscript
}

...which should do all the websites in one go, and only restart the server once.

The "date" commands were to give me a new timing for how long the process takes. This appears to have reduced it from about half an hour to... 21 seconds. Now true, this week it didn't do any compression (there are now four compressed logs, and one - the latest backup - is uncompressed), but that seems like a scarily large difference.

So, now would be the time to let me know if you see any problems with you stats, or bizarre log problems.
________
RichGCheers,
Rich.
  ^[ Log in to reply ]
 

Acorn Arcade forums: Site Comments: Check stats and logs