What ver of syslog-ng? and what distro are u running syslog-ng on? what does your config look like?
 
michael


>>> aning@jetnet.ca 07/11/02 09:49AM >>>
Just add a little more info, if I send the first 10 messages a little bit slower, say delay 10 msec in between,  then it doesn't happen.
-----Original Message-----
From: Antai Ning [mailto:aning@jetnet.ca]
Sent: Wednesday, July 10, 2002 1:38 PM
To: 'syslog-ng@lists.balabit.hu'
Subject: [syslog-ng]Strang behaviour of syslog-ng (and my program)

Hi Gurus,
 
I got some strange phenomemon with syslog-ng. Here is what I'm doing.
 
I configured syslog-ng to forward certain type of messages to a pipe. (say, ALERT). I wrote a program in perl to read from the pipe and print them out. The perl program first try to open the pipe and it'll block at the open function untill syslog-ng has some messages to write to the pipe. Then the perl program reads using IO::File can_read() function, with a 5 seconds timeout. So the function looks like this: $sel->can_read(5). Then I send 10 valid messages to syslog-ng from a remote machine by UDP. To my supprise, the perl program got only 2 of the 10!  Then I send another 1 valid message to this syslog-ng after 5 minutes, and I got not only this message, but also the 8 I lost last time! 
 
This happens only for the first 10 messages (which includes the opening of the pipe). Everything is fine after the first round. It looks like it's related to the pipe opening and messages get queued somewhere until later messages trigger the queue to flush.
 
So what's really happening inside? And is there a solution?
 
 
Thanks,
 
Andy