Skip to content

Latest Develop branch, new error message: One or more transfer workers failed #479

Open

Description

@arno-st

Hello,
I did an updated this morning of the latest version on develop, and I got this 2 new messages
My syslog is configured with 2 Maximum Syslog Processing Processes

23/11/2026 15:23:10 - SYSLOG SYSLOG ERROR: One or more transfer workers failed; stale incoming records were retained
23/11/2026 15:23:10 - SYSLOG WARNING: Syslog worker(s) exited without recording completion: 1, 2

Doing a debug on syslog, doesn't give me more information.

Activity

  1. arno-st commented on Nov 23, 2026

    @arno-st
    ContributorAuthor

    A few more information:

    23/11/2026 16:06:01 - SYSLOG WARNING: Syslog worker(s) exited without recording completion: 1, 2
    23/11/2026 16:06:01 - SYSLOG NOTE: Syslog launched 2 'transfer' worker process(es)
    23/11/2026 16:06:01 - SYSLOG WARNING: Syslog child 1 exited; the processing run that launched it no longer holds the processing lock
    23/11/2026 16:06:01 - SYSLOG WARNING: Syslog child 2 exited; the processing run that launched it no longer holds the processing lock
    23/11/2026 16:06:11 - SYSLOG SYSLOG ERROR: One or more transfer workers failed; stale incoming records were retained
    23/11/2026 16:06:11 - SYSTEM SYSLOG STATS: Time:20.52 Deletes:0 Incoming:847 Removes:57 XFers:57 Alerts:8 Alarms:5 Reports:0
    
  2. ARC1450 commented on Nov 30, 2026

    @ARC1450

    I'm also getting this when using more than one worker thread. Setting it to one, there's no issue.

  3. TheWitness commented on Dec 3, 2026

    @TheWitness
    Member

    The guys were making changes today to the thold daemon. Let me ask my robot to comment.

  4. TheWitness commented on Dec 3, 2026

    @TheWitness
    Member

    I've looked into this. Here's what I found.

    Already fixed? No. No open or recently merged pull request touches this code. The check that fails was added in #473 (merged 2026-11-20), three days before this report. Nothing merged since has changed it.

    What the messages mean

    syslog_process.php takes a named processing lock (GET_LOCK) on a separate database connection. It passes that connection's CONNECTION_ID() to each worker as --lock-owner=N. After registering, each worker runs SELECT IS_USED_LOCK(<lock name>) on its own Syslog connection. If the result is not N, the worker logs ...no longer holds the processing lock and exits without writing anything. The master then reports exited without recording completion and One or more transfer workers failed.

    Both phases fail this way. That is why your runs take about 20 seconds: each phase waits the full 10-second registration grace for workers that have already exited. Records stay in syslog_incoming and are retried, so nothing is lost. With one process the workers aren't used, so the check never runs. That matches what @ARC1450 sees.

    I could not reproduce it. With 2 workers and 500 queued messages, every run passed the lock check and transferred everything:

    • Cacti develop, and Cacti 1.2.x at 1.2.30 and 1.2.32
    • $use_cacti_db = true, and a separate Syslog database
    • socket (localhost) and TCP (127.0.0.1) connections
    • $database_persist true and false
    • run directly and launched by poller.php

    So something in your setup makes the workers see a different lock holder, or none, than the master. The most likely causes:

    1. A proxy or cluster between Cacti and the database (ProxySQL, MaxScale, HAProxy, Galera). GET_LOCK locks are local to one server. If the master's lock connection and the workers' connections reach different backends, IS_USED_LOCK() returns NULL for the workers.
    2. Something ending idle connections. For example a KILL script, or a proxy/firewall idle timeout shorter than one processing run. The lock connection sits idle for the whole run.

    Could you check these?

    1. Which database server and version, and is there any proxy, load balancer or cluster between Cacti and it?
    2. In plugins/syslog/config.php (or config_local.php): $use_cacti_db, and $syslogdb_hostname / $database_hostname.
    3. While syslog_process.php --debug is running, from another MySQL session (replace syslog with your Syslog database name, or the Cacti database name when $use_cacti_db = true):
      SELECT IS_USED_LOCK(LEFT(SHA2(CONCAT('syslog', '.syslog_processing'), 256), 60)) AS holder;
      SELECT ID, USER, HOST, DB, COMMAND, TIME FROM information_schema.PROCESSLIST WHERE ID = <lock-owner>;
      <lock-owner> is the --lock-owner= value in the debug About to Spawn lines. If holder is NULL or a different number, or that ID doesn't exist, we'll know which case it is.

    Two things I'll fix regardless

    • The registration wait counts only workers still running. When workers finish or exit before the master looks, it waits the full 10 seconds anyway. I reproduced this on every run: workers that finished in 0.00 s still cost 10 seconds per phase.
    • The worker's message doesn't show what it actually saw. It will log the expected owner and the IS_USED_LOCK() result, so this kind of failure can be diagnosed from the log alone.
  5. TheWitness commented on Dec 3, 2026

    @TheWitness
    Member

    The defect I mentioned above is fixed in #494.

    • Waiting on workers that already exited: the master now treats a worker as accounted for once it has registered or recorded its result. It no longer waits out the 10-second registration window per phase for workers that have already finished or exited. In my 2-worker test the run time fell from 11.2 s to 1.48 s.
    • Diagnostics: when the lock check fails, the worker now records the failure so the master stops waiting. It also logs what it saw, e.g.:
      Syslog child 1 exited; the processing run that launched it no longer holds the processing lock (expected connection 54, IS_USED_LOCK returned NULL)

    #494 does not fix why your workers fail the lock check. That still depends on your database setup, so the questions above still apply. After you update to #494, the new log line should show which case it is: NULL means the workers can't see the lock at all (likely a proxy or cluster, or the lock connection was dropped), and a different number means another session holds it.

  6. TheWitness commented on Dec 3, 2026

    @TheWitness
    Member

    We are going to nix all use of GET_LOCK anywhere it exists in the Core Cacti and plugins. It might take a little time to get it cleared out. In the mean time, if you could provide the details that were requested, that would be great.

  7. arno-st commented on Dec 3, 2026

    @arno-st
    ContributorAuthor

    I'm using mariadb 10.6.24 on a cluster of 3 members, as active-active. And then I have maxscale on Cacti.
    Syslog setup is readwritesplit, and use another database than cacti.
    I change my setting to have 1 worker, so no more error message.

    I will update to the latest, and see what's going on.

  8. TheWitness commented on Dec 3, 2026

    @TheWitness
    Member

    Okay, I'm surprised @somethingwithproof did not chime in last night on this. Long day for him too. We are removing the use of GET_LOCK() in the code as it does not work with HA setups like Galera. That's likely the root cause of the issue. According to my agent, that merge was done last night. So, you should test again today with the latest changes.

  9. ARC1450 commented on Dec 3, 2026

    @ARC1450

    @TheWitness I'm just running a single MariaDB 11.8 server on RHEL 9 (but with DISA STIGs applied and fapolicyd). Since the DISA stuff is applied, I'll check and make sure none of my timeouts are less than the processing run (I assume 300 seconds, or 5 minutes).

    I know all my files are not using the Cacti core DB, but a separate syslog. I'll double check when I get to work anyway. I'll post the sanitized DB query when I get in to work, but that'll be on the forums since Github access is. . .spotty, at best.

    The defect you mention in #494 gives me an answer as to why my syslog process takes about 5 seconds when it's singular and around 20 seconds when it's two or more. We have about 20,000 - 30,000 logs per minute inbound.

  10. TheWitness commented on Dec 3, 2026

    @TheWitness
    Member

    Cool. Lot's of things moving at the moment. We have I think a few more days of churn. I've already started testing in earnest and found some AI generated regressions mainly in Re-index handling, but there may be more to come. @somethingwithproof removed the GET_LOCK from syslog last night which will help in clustering setups. Want to make sure it's stable before pushing a formal release as it's a big deal. Thanks for testing guys!

  11. TheWitness commented on Dec 3, 2026

    @TheWitness
    Member

    If you guys are running the develop version of Cacti, we have a massive backlog there. We are trying to focus on the 1.2.x branch right now as we are way behind on getting the release out. If you happen to be on develop and experiencing something significant, just hit us on developers at cacti dot net.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions