Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  06 Jul 2026, Joel Sander, Suggestion, mlogger MySQL improved connection 
    Reply  08 Jul 2026, Konstantin Olchanski, Suggestion, mlogger MySQL improved connection 
Message ID: 3242     Entry time: 08 Jul 2026     In reply to: 3239
Author: Konstantin Olchanski 
Topic: Suggestion 
Subject: mlogger MySQL improved connection 
you can also copy the reconnect code from history_schema.cxx.

if I remember right, the test case for correct reconnect is to start the mlogger, 
have it write something to mysql, then restart mysqld (mlogger connection is now 
broken), then have mlogger write some more to mysql. it should get an error 
"connection broken", reconnect and retry the write.

(to avoid it getting stuck, there should be a limit of 10 attempts to reconnect 
plus retry, in case each retry crashes mysqld or throws an unrelated error).

the code in question I think is mlogger mysql supoprt for begin and end of run, 
so you start a run, restart mysqld, stop the run, start a new run and should see 
a successful reconnect.

K.O.
ELOG V3.1.6-083448f7