My /usr/local/apache/logs/error_log was almost 5 gigs in size, due to broken ssi commands after I changed servers causing the website not to respond, they had to pay some tech to figure it out. Pretty fucked up huh?
really big error_log
Collapse
X
-
I had no idea a big error log would cause httpd to stop working,
we kept seeing "httpd dead but subsys is locked" on the "httpd status" command thought something was really fucked up for awhile. I learned today that there is a million unix commands I don't understand7Comment
-
the bigger the files get the more resources (in theory) they'll eat. although i don't know the technical specifics of file I/O and shit in linux and other unices, it does keep the file open but may be able to flush the memory each write.. problem is opening the file to append it may need to open the huge file. but again, i'm not on that level of technical knowledge.
php/mysql guru. hosting, coding, all that jazz.Comment
-
Originally posted by kenny
My /usr/local/apache/logs/error_log was almost 5 gigs in size, due to broken ssi commands after I changed servers causing the website not to respond
I see this fairly often on servers that are not managed properly. Apache usually stops working at 2 GB, I believe that has something to do with maximum file size limit, not any problem with too much resources being used. 5 GB is much less common, what version of Apache and OS are you using?
I just usually send the main error log to /dev/null and the virtual host error logs to users directory after a server is running.Does anyone look down here?Comment
-
kenny, find a new admin, one who knows
how write a 3 line log rotate script.
i ran into this type of thing A LOT when
i was running efront's servers. and their
webmasters would insist it be fixed
without shutting down httpd.
one thing you can do to blow out
the logs, is
cp /dev/null /path/to/logfile
will zero out the file.
note, depending on the os, if you do this
while the server is running, you may have some issues, depending on whether the app has an open file handle to the log. in which case you'll see it as 0 bytes in a long list (ls -l), but you won't have the space back in
a df output. if that happens, send apache
a HUP. (apachectl restart should work fine)
again, get a new admin, the one you have doesn't seem to be able find his/her ass with both hands and a mirror.
tComment
-
Currently, my apache logfile size is
11326424423
Which is 11.3Gb. I am having no problems though but i'm going to delete it.<a href="http://www2.famoushost.com/home.php" target="_blank"><b><FONT COLOR="FFFF00">www.FamousHost.com</font></b></a><br>Free Hosting With No Headers, Real FTP, <u>Get listed on the biggest TGP's with us!</u>Comment
-
Apache doesn't care about huge files.
to quickly remove a big file do
promt# cat /dev/null > /path/to/file
this way you won't need to restart apache.
and if you don't need error logs link the file to /dev/null
ln -s /dev/null /path/to/error_logComment

Comment