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
- Upgrading your RISC OS system to 5.30 (News:1)
- Wakefield Show 2024 in Pictures (News:4)
- RISC OS 5.30 arrives (News:1)
- April 2024 News Summary (News:1)
- uniprint upgraded to 4.50 (News:)
- PhotoDesk 3.23 released (News:)
- R-Comp reveals N.Ex.T Boxes - the successor to the i.MX6 (News:)
- RISCOSbits at Wakefield Show 2024 (News:)
- R-Comp releases Genealogy v2 (News:)
- Will we see 5.30 released at Wakefield show? (News:1)
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: 6828
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