[syslog-ng] internal() messages looping back on PostgreSQL restart

Aaron awol.lordofthepants at gmail.com
Mon Aug 8 23:34:00 CEST 2011


I have syslog-ng logging to a remote PostgreSQL database and to a local log file as well.  If at any point the Postgres database restarts and syslog-ng happens to attempt to log to the database for the brief period that Postgres is unavailable, my local messages are flooded with internal() looping back messages similar to this:

syslog-ng[31587]: syslog-ng internal() messages are looping back, preventing loop by suppressing further messages; recurse_count='3'
syslog-ng[31587]: syslog-ng internal() messages are looping back, preventing loop by suppressing further messages; recurse_count='3'
syslog-ng[31587]: syslog-ng internal() messages are looping back, preventing loop by suppressing further messages; recurse_count='2'

My guess is that syslog-ng panics when it is unable to connect to the PostgreSQL database.  The problem is that syslog-ng never re-establishes the connection, and writes several thousands of the above messages to the local log file each second, which can become a little problematic resource-wise.  In order to make syslog-ng behave again, I need to manually restart the service, otherwise it would continue to flood my local messages and never reconnect to the database.  

I thought it might be a problem with my configuration, and I tried using the time_reopen() option but that seemed to have no effect.  Is this perhaps a bug?

Syslog-ng version: 3.2.4


More information about the syslog-ng mailing list