[syslog-ng] syslog-ng blocking application

Ulrich David david.ulrich at netplus.pro
Tue Feb 21 14:10:49 CET 2012


Hi,

I have an ISC-DHCP who is logging on a local facility on a chrooted system :

#options { 
#        chain_hostnames(no); 
#        use_dns(no);
#        flush_lines(1);
#        stats_freq(3600); 
#};
#source dhcp_src {
#    unix-stream("/chroot/dhcp/dev/log" max-connections(256));
#};

My syslog-ng take logs from this source, filter on program and then put the logs on two destinations :

#filter f_chroot_l2 {
#        program(dhcpd);
#};
#
#destination dhcp_log { file("/var/log/dhcpd.log" perm(0644)); };
#destination dhcp_sql { program("/usr/local/sbin/dhcp_log_to_mysql"); };
#
#log { 
#        source(dhcp_src);
#        filter(f_chroot_l2);
#        destination(dhcp_log);
#        destination(dhcp_sql);
#        flags(final );
#};

Everything goes well… until I block my program "dhcp_log_to_mysql" (I do it with a lock on the mysql table it uses or with a sleep in the script - for test).

When "dhcp_log_to_mysql" is blocked, logs continues to be written on dhcp_log for some minutes/seconds then it stops. My chrooted dhcpd hangs on that too.

I don't know why syslog-ng is not just dropping logs (continuing eating them on the source). I don't have flow-control enabled… and I find nothing which can explain the problem.

I try to resize the buffer output with very big number (log_fifo_size(45000000)) but it changes nothing. Logs and dhcpd hangs at the same moment.

What can I do?

Regards

David


More information about the syslog-ng mailing list