Date: Wed, 01 Nov 2000 07:11:52 -0800 From: Drew Tomlinson <drewt@writeme.com> To: 'Bjorn Tornqvist' <bjorn.tornqvist@west.se>, freebsd-questions@freebsd.org Subject: RE: /var still full after cleaning up! Message-ID: <8C224DC088D8D111B67D0000F67AC17E0306D525@ldcmsx01.lc.ca.gov> In-Reply-To: <3A002CB8.BF33C0B7@west.se>
next in thread | previous in thread | raw e-mail | index | archive | help
> -----Original Message----- > From: Bjorn Tornqvist [mailto:bjorn.tornqvist@west.se] > Sent: Wednesday, November 01, 2000 6:46 AM > To: freebsd-questions@freebsd.org > Subject: /var still full after cleaning up! > > > howdy! > > Due to a bug in modphp my httpd-errors.log grew enourmous and I had to > remove it since /var became full. > However, after removing it, 'df' still showed that /var was > full, and I > still got errors about it being full. > > The only solution I've found is to reboot, but since this is a live > system (4.1-STABLE) I find this unacceptable. > > Anyone know another solution? From the Apache manual: How to reset your log files Sooner or later, you'll want to reset your log files (access_log and error_log) because they are too big, or full of old information you don't need. access.log typically grows by 1Mb for each 10,000 requests. Most people's first attempt at replacing the logfile is to just move the logfile or remove the logfile. This doesn't work. Apache will continue writing to the logfile at the same offset as before the logfile moved. This results in a new logfile being created which is just as big as the old one, but it now contains thousands (or millions) of null characters. The correct procedure is to move the logfile, then signal Apache to tell it to reopen the logfiles. Apache is signaled using the SIGHUP (-1) signal. e.g. mv access_log access_log.old kill -1 `cat httpd.pid` Note: httpd.pid is a file containing the process id of the Apache httpd daemon, Apache saves this in the same directory as the log files. Many people use this method to replace (and backup) their logfiles on a nightly or weekly basis. HTH, Drew > TIA, > Bjorn > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8C224DC088D8D111B67D0000F67AC17E0306D525>