Make ZBX_DATA_TTL configurable without rebuild

XMLWordPrintable

    • Type: New Feature Request
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Zabbix Server 7.4.2, Zabbix Proxy 7.4.3

      In the Zabbix codebase, in include/zbxtask.h, there is a compile-time macro named ZBX_DATA_TTL. The only purpose of this macro, as far as I can tell, is to influence how long a Zabbix task can run for, before Zabbix throws a "Timeout while waiting for result." error.

      This code is found in zabbix/src/libs/zbxtasks/task.c:

      	for (int time_start = time(NULL), i = 0; ZBX_DATA_TTL > time(NULL) - time_start; i++)	{
      // ...
       	}
      	*info = zbx_strdup(NULL, "Timeout while waiting for result.");
      	return FAIL;

      The current value of ZBX_DATA_TTL, at least in the source code tagged as 7.4.2 on GitHub, is 30 - I.E Zabbix will wait 30 seconds for a task to complete before timing out.

      I'm sure this value was chosen for good reason, and I'm not proposing increasing it by default. However, we have a handful of devices with two issues: first, they have a lot of data to return from an SNMP WALK query, and second, they often take a while to respond to the WALK query when the device in question is under load.

      When these devices are queried through a Zabbix proxy, in some cases, they take more than 30 seconds to fully respond, causing Zabbix to time out, even when the device is still returning data (I have tested this on the command line with snmpwalk and it can often take 40-45 seconds to finish responding to a WALK request).

      If I increase ZBX_DATA_TTL from 30 to 60 and compile Zabbix from source, then the issue is resolved - Zabbix waits just a little bit longer for tasks to complete, and the SNMP WALK requests finish without throwing errors.

      It seems very silly to have to fork Zabbix just to increase the time-to-live for tasks. Would it be possible to make the task/data TTL configurable like other timeouts?

            Assignee:
            Unassigned
            Reporter:
            Nick Lockhart
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: