LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-25-2003, 05:30 PM   #1
shilbert
LQ Newbie
 
Registered: Jun 2003
Posts: 2

Rep: Reputation: 0
Apache logging stops at 4k boundaries


I'm running Apache/1.3.27 on a Slackware install (2.4.18 kernel, SMP, SCSI harddrives... it's an IBM rackmount server), and it's been working fine for quite a while. In fact I've had almost no problems with it. However I was trying to look at my access logs recently and I realized that it hadn't logged anything since June 4th. (Yes, I checked my system date :P ) Anyway, I tried rotating the logs, because I figured maybe it was too big for apache (I hadn't rotated the logs in quite a while, they were huge.) It wouldn't log to the new clean access logfile either, even after a full system reboot. I tried adding stuff to the logfile manually, and lo and behold, when I added a newline it would magically start logging again. I thought it was fixed, but it suddenly stopped again, when the logfile was exactly 4096 bytes (the size of one block on my FS.) I added another newline and it started working again, up until 8192. Tried it again, and it worked up to 12288 bytes. Apparently Apache just refuses to increase the size of the logfile past a block boundary. I doubt it's a problem with the disk, filesystem, etc. because I can write to the file perfectly otherwise. All permissions are perfect too. Does anyone know if this is a well-known problem? I couldn only find one reference to something that sounded like it, and it didn't have any answers. (It's in the linuxmanagers mailing list archives, I can't post the URL here because I'm a new user.)

So, is there a reason/fix for this? (Perhaps an upgrade?) Or am I going to have to pipe it through a logger daemon to circumvent this?
 
Old 06-26-2003, 12:06 PM   #2
xiaodown
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Redhat, Centos, Fedora
Posts: 37

Rep: Reputation: 15
I seem to remember having to touch a file after rotating it...?

Like, mv error_log error_log-old-and-busted; touch error_log
or mv error_log error_log-old; tail error_log-old > error_log

Hrm....
 
Old 06-26-2003, 12:14 PM   #3
shilbert
LQ Newbie
 
Registered: Jun 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Yes, Apache will only add stuff to a log after a newline, or that's how it looks (although I haven't been able to actually find that in the code.) Even if I do that, though, it'll still cut off in the middle of a line at a 4k boundary and refuse to log until I feed some more data into it again :/
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache stops working after kernel upgrade xbaez Linux - Networking 1 07-05-2004 12:14 AM
Are there proper partition block boundaries? GrumpyGnome Linux - Software 0 06-01-2004 03:34 PM
Apache stops responding after several hours. seedsca Linux - Networking 6 03-29-2004 03:18 AM
Apache, SSh, Webmin, stops when laptop standby carlosruiz Linux - Laptop and Netbook 1 03-13-2004 06:33 AM
fdisk gives me warnign about cylinder boundaries.. zeppelin Linux - Hardware 2 10-19-2003 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration