1 |
On Wednesday 04 May 2011 18:14:49 kashani wrote: |
2 |
> On 5/4/2011 7:38 AM, Alan McKinnon wrote: |
3 |
> > Apparently, though unproven, at 08:15 on Wednesday 04 May 2011, Joost |
4 |
> > |
5 |
> > Roeleveld did opine thusly: |
6 |
> >> On Wednesday 04 May 2011 13:48:48 Adam Carter wrote: |
7 |
> >>>> Well, 2.2.17 is indeed my server, but I decided to stop it and start |
8 |
> >>>> it again. Current log files showed up. |
9 |
> >>>> Problem solved, by brute force again, and without any epiphanies of |
10 |
> >>>> understanding. |
11 |
> >>> |
12 |
> >>> Last guess - logrotate is managing the log files but not reloading |
13 |
> >>> apache afterwards. Check that the entries in /etc/logrotate.d/apache2 |
14 |
> >>> have a line in there that runs /etc/init.d/apache2 reload. |
15 |
> >> |
16 |
> >> Adam, |
17 |
> >> |
18 |
> >> I think you got a really good guess. :) |
19 |
> >> Especially as the log-files listed by lsof have status "deleted": |
20 |
> >> ** |
21 |
> >> apache2 5288 root 9w REG 8,44 57327591 |
22 |
> >> 204998 /var/log/apache2/access_log-20110204 (deleted) |
23 |
> >> ** |
24 |
> >> |
25 |
> >> Interesting things happen when a file is deleted while a process still |
26 |
> >> has access. |
27 |
> > |
28 |
> > You mean like as in it's name goes away and absolutely nothing else |
29 |
> > changes whatsoever? |
30 |
> > |
31 |
> > The only trouble you can run into is that new process that did not have |
32 |
> > the file open now cannot find it. |
33 |
> |
34 |
> If you're doing it poorly enough, you can fill the filesystem with |
35 |
> "deleted" files. The other fun one is having a daemon grow larger and |
36 |
> larger because it's not letting go of files that were deleted while it |
37 |
> had them open. |
38 |
|
39 |
Does your /etc/logrotate.d/apache2 script contain something like this: |
40 |
|
41 |
/var/log/apache2/*log { |
42 |
missingok |
43 |
notifempty |
44 |
sharedscripts |
45 |
postrotate |
46 |
/etc/init.d/apache2 reload > /dev/null 2>&1 || true |
47 |
endscript |
48 |
} |
49 |
|
50 |
-- |
51 |
Regards, |
52 |
Mick |