GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   really big error_log (https://gfy.com/showthread.php?t=67094)

kenny 07-07-2002 03:38 PM

really big error_log
 
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?

mike503 07-07-2002 03:55 PM

apachectl stop

rm error_log

apachectl start


problem solved. or mv it somewhere, if you want a backup that badly. :) be sure to gzip though.

kenny 07-07-2002 04:06 PM

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 understand

mike503 07-07-2002 04:15 PM

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. :)

kenny 07-07-2002 04:23 PM

Don't I feel stupid. spent 8 hours reading old apache yahoo forums and surfing google for answers, and the whole time the answer was in my sig:)

RK 07-07-2002 05:02 PM

Quote:

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.

toddler 07-07-2002 05:32 PM

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.

t

mike503 07-07-2002 09:13 PM

there's a "rotatelogs" script that comes with apache.. put that down too, it'll help. (you could even rig it to gzip old logfiles too..if it doesn't already.)

Dreamman010 07-07-2002 10:35 PM

Currently, my apache logfile size is

11326424423

Which is 11.3Gb. I am having no problems though but i'm going to delete it.

darksoul 07-08-2002 03:20 AM

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_log


All times are GMT -7. The time now is 08:49 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123