[syslog-ng]File descriptor still opened after log rotation

Balazs Scheidler bazsi@balabit.hu
Wed, 22 Jan 2003 11:53:56 +0100


On Wed, Jan 22, 2003 at 10:53:15AM +0100, Xavier de Labouret wrote:
> 
> >> I have a strange behaviour with syslog-ng 1.4.16 and rotated files. It
> >> looks like syslog-ng keeps file descriptors opened, despite the time_reap
> >> parameter, in a file where very few logs are sent. This generates
> >> problems with log rotations.
> >
> > time_reap() is only used when a filename with macros in it is used. e.g.
> 
> [Sorry for breaking the thread, i had not subscribed to the list before posting in it]
> 
> Thank you for this quick answer, for i had no clue with this problem.
> 
> Here are my questions:
> 
> 1) Is this by design? I did not find this restriction it in the docs. In
> this case, it would be of great help to write explicitely in the docs
> that time_reap applies only to macro-generated file destinations. I can
> get a turnaround for this by using $FACILITY, which won't change during
> execution for this destination.
> 
> 2) Is it planned to stay so? I am inclined to think that this feature
> would be helpful for any file destination, to prevent conflicts with
> rotations. Do you intend to extend the time_reap feature to any file
> destination?

I think it would be a wrong way to go to make log rotations rely on the fact
the no messages arrived within the last 5 minutes.

I'm more for the idea of creating a signal which would make syslog-ng reopen
all its files without reloading configuration.

thus -> move file -> send signal to syslog-ng -> the file is released

You can do this right now with the HUP signal as it reopens the files,
though it also rereads the configuration.

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1