[syslog-ng] reconnect DB session after timeout

"Marcus Groß" Mgsyslog at gmx.de
Mon Jun 27 13:59:46 CEST 2011


Hi,

I'm running syslog-ng v. 3.2.4 on SLES 10. There are three defined MySQL DB destinations.
Everything is running fine, until the MySQL server resets the connection(s) after a defined idle time if no
messages are send to this database.
The problem is that syslog-ng doesn't reconnect the disconnected connection  ;)

I have to restart syslog-ng to bring it back to life.

Is there any posssibility to reopen the DB connection instead of disabling the idle timeout on the MySQL side?

syslog-ng[4904]: Error running SQL query; type='mysql', host='snsanmg8429', port='', user='syslog', database='SysLog', error='20
06: MySQL server has gone away', query='CREATE TABLE SysLog_Brocade_2011_06_09 (Host varchar(255), Facility varchar(255), Priority varchar(255), Level varchar
(45), Date varchar(45), Program varchar(255), Message varchar(700))'

syslog-ng[4904]: Error creating table, giving up; table='SysLog_Brocade_2011_06_09'
syslog-ng[4904]: Error checking table, disconnecting from database, trying again shortly; time_reopen='60'
syslog-ng[4904]: Error running SQL query; type='mysql', host='snsanmg8429', port='', user='syslog', database='SysLog', error='20
06: MySQL server has gone away', query='CREATE TABLE SysLog_Brocade_2011_06_09 (Host varchar(255), Facility varchar(255), Priority varchar(255), Level varchar
(45), Date varchar(45), Program varchar(255), Message varchar(700))'
Jun  9 09:43:56 snnasmg8421 syslog-ng[4904]: Error creating table, giving up; table='SysLog_Brocade_2011_06_09'

M.


More information about the syslog-ng mailing list