large /var/log/apache2/access_log

Hello,

I wonder why my Mac OS X 10.5.8 /var/log/apache2/access_log is never purged. It is now >1GB. Should it be rotated??

Thanks for any info.

Mac mini 2.66GHz and PowerBook G4 1.25GHz 15 FW800, Mac OS X (10.6.6), iMovie HD 6.0.3, iDVD 7.0.4 -- I don't benefit from any link

Posted on Mar 9, 2011 9:37 AM

Reply
6 replies

Mar 9, 2011 1:51 PM in response to a brody

Should it be rotated??


It should help.


But how? Isn't the OS supposed to do that automatically?

I've previously manually done...

sudo periodic daily
sudo periodic weekly
sudo periodic monthly

...but AFAIK 10.5 should now do those tasks automatically even during daytime. Or do those scripts even touch the apache logs??

Or is something in my system blocking that??

...this does bother me only because Carbon Copy Cloner takes several minutes backing up that file...

Mar 9, 2011 4:58 PM in response to Matti Haveri

I'm reading that beginning with Leopard newsyslog has taken over that job. (Select 10.5 in the dropdown on the page.)

http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/ 10.5/man5/newsyslog.conf.5.html

Set to run at 12:30 AM (maybe 12:00?) if the computer is awake, and I believe unlike the periodic scripts won't run at next wakeup. Haven't tried, but looks like the time when it is set to rotate can be edited.)

Message was edited by: WZZZ

Mar 12, 2011 10:09 AM in response to a brody

Try temporarily turning off Apache


Where do I do that? I only have File sharing via AFP ON (no web sharing etc).

Or do Parental Controls generate this file (I currently have it enabled for two users)?? AFAIR I learned about that access_log file in these forums when somebody asked how to delete Parental Controls history.

My PowerBook's >1GB /var/log/apache2/access_log currently lists every single web browser event since 2004 when the system was installed!

And besides, viewing the Parental Control logs has always been very flaky: usually the report is empty or it may crash the System Preferences altogether.

Maybe I should turn Parental Control off for a while. Or maybe manually delete error_log
and access_log; I guess they are automatically generated when needed. Maybe some old glitch is preventing them from rotated?

The PowerBook works OK but I fear that kind of big log files might slow it down (compared to my new Mac mini the PB feels quite slow already...).

Mar 12, 2011 1:10 PM in response to Matti Haveri

Just FYI:

I experimented a little on my backup disk. I had to enable root for some operations.

I deleted /var/log/apache2/access_log and error_log.

Then I also deleted:

/Library/Application Support/Apple/ParentalControls/Users content, i.e. all user entries there.

All those files were re-created as smaller incarnations after re-booting and after those users logged in and used Safari.

Parental Control logs seem to behave better now, but maybe that's only because the re-created log files are still quite small.

The access_log and error_log are only updated for Parental Controlled users.

I wonder why in Mac OS X 10.6 the corresponding /var/log/apache2/ is empty although Parental Controls are configured the same as in Mac OS 10.5. Obviously 10.6 changed the organization of the files and folders there.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

large /var/log/apache2/access_log

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.