SQL error every night

  • Hello,


    i have a thruk 2.14-2 on red hat 7.3


    every night at 1:0x AM i have this error in my thruk.log


    [Mon Oct 9 01:05:21 2017][INFO] fetched ids

    [Mon Oct 9 01:07:06 2017][INFO] sorted used ids

    Use of uninitialized value $file_id in numeric lt (<) at /usr/share/thruk/lib/Thruk/Backend/Provider/Mysql.pm line 1186, <$fh> line 12026731.

    Use of uninitialized value $file_id in numeric lt (<) at /usr/share/thruk/lib/Thruk/Backend/Provider/Mysql.pm line 1186, <$fh> line 12026731.

    ...

    about 100 00 lines later

    Use of uninitialized value $file_id in numeric lt (<) at /usr/share/thruk/lib/Thruk/Backend/Provider/Mysql.pm line 1186, <$fh> line 12026731.

    [Mon Oct 9 01:08:49 2017][INFO] running clean for site XXX

    [Mon Oct 9 01:08:49 2017][INFO] cleaning logs older than: Thu Aug 10 01:08:49 2017

    [Mon Oct 9 01:08:49 2017][INFO] cleaning old orphaned plugin outputs

    [Mon Oct 9 01:08:50 2017][INFO] fetched ids

    [Mon Oct 9 01:08:50 2017][INFO] sorted used ids


    block on line 1186

    # this means the id is not used anymore

    while($db_id < $file_id) {

    push @bulk_delete, $db_id;

    $sth->fetch;

    $to_delete++;

    last unless $db_id;


    if($to_delete > 100) {

    $plugin_ref_count += $dbh->do("DELETE FROM `".$prefix."_plugin_output` WHERE output_id IN (".join(",", @bulk_delete).")");

    @bulk_delete = ();

    $to_delete = 0;

    $dbh->commit or die $dbh->errstr;


    do you know where this error came from?


    thanks