[syslog-ng]RE: HUP'ing syslog-ng causes data loss

UK uking@us.ibm.com
Tue, 18 Dec 2001 13:53:19 -0600


Follow-up question:

To rotate logs, should I be sending a HUP to syslog-ng or is there another
way to accomplish this?

Thanks again,

UK
-----Original Message-----
From: UK [mailto:uking@us.ibm.com]
Sent: Wednesday, December 12, 2001 10:40 AM
To: syslog-ng@lists.balabit.hu
Subject: HUP'ing syslog-ng causes data loss

When syslog-ng receives a HUP signal it closes and reopens all listening
sockets. Because this takes some time, it may be responsible for the data
loss.

There was a request in private mail to add a keep-listener-alive() option,
which would avoid this close operation, which could help a bit, this is
however a todo item, and not reality.

--
Bazsi

On Wed, Dec 12, 2001 at 10:40:25AM -0600, UK wrote:
> Greetings,
>
> Trying to see what happens when syslog-ng (Version 1.4.14 on Solaris 8)
gets
> HUP'ed, as my logrotate scripts will do, while it's receiving UDP data.
> Using the stresstes.sh script on another host (which is using the
syslog-ng
> box as a loghost), a stream of messages will be sent. The while loop was
> changed to:
>
>  while [ "$i" -lt "1000" ]
>
> After the script ran, a "cat messages | wc -l" was done against the log
and
> the results would be approx 995 lines (probably because it's UDP). Then
I'd
> move the file and HUP syslog-ng and retested a few more times. Same
results
> each time.
>
> Next, while stresstest.sh was running, syslog-ng would be HUP'ed two or
> three times. After every test the "cat messages | wc -l" would show
between
> 965 - 975 lines.