[syslog-ng] deadlock when logging to SQL destination (PostgreSQL)

Tomáš Novosad tomas.novosad at linuxbox.cz
Fri Jan 2 15:24:57 CET 2015


Hello to everyone,

i'd like to as if someone else experienced such thing before.

I have a setup where i'm storing maillog and mailfilter log into
PostgreSQL database via syslog-ng.
Togethe with that, PostgreSQL is logging via syslog-ng as well.

This setup creates some sort of deadlock:
after some time of processing (varies)  syslog-ng freezes,
thus completely blocking the server.
It is not possible to do anything on the server as all calls to syslog
just blocks.
I'm not able to open new SSH session, as login is logged via syslog.
Emails do not work as senmail is logging via syslog.
These and all other applications just hung, whenever they try to write
something into syslog.

This deadlock is caused by rather "circular" setup, when syslog writes
into Postgres and Postgres logs into syslog.
I'm able to reproduce the problem in my testing environment.
When Postgres does not log into syslog (only CSV logs are enabled,
everything goes just fine.
Same thing if syslog-ng stores nessages in Postgres on different host -
everything is OK.
But in scenario when postgres is on localhost and logs into syslog,
i'am experiencing those deadlocks.

Does anyone has similar experience?

We're regulary using syslog-ng 3.4.6, but i have juste tested it on
latest version 3.4.8 - same problem appeared.
Postgres is of version 9.2.
We're using our own CentOS-based distro (currently CentOS 6).

I can provide configs, or reproduce the problem if needed.

Thanks for any help or hints.
-- 
Tomáš Novosad
LinuxBox.cz, s.r.o.
28. října 168, 709 00 Ostrava

tel.:   +420 591 166 221
mobil:  +420 737 238 655
email:  tomas.novosad at linuxbox.cz
jabber: novosad at linuxbox.cz
www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: servis at linuxbox.cz



More information about the syslog-ng mailing list