[ZBXNEXT-9495] Allow user to set the frequency for task manager Created: 2024 Sep 18  Updated: 2024 Sep 21  Resolved: 2024 Sep 21

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Proxy (P), Server (S)
Affects Version/s: 6.0.32, 7.0.2
Fix Version/s: None

Type: Change Request Priority: Trivial
Reporter: dimir Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The task manager process of Zabbix server and proxy is handling tasks every 5 seconds, hard-coded value:

$ grep '#define ZBX_TM_PROCESS_PERIOD' src/zabbix_*/taskmanager/*.c
src/zabbix_proxy/taskmanager/taskmanager_proxy.c:#define ZBX_TM_PROCESS_PERIOD          5
src/zabbix_server/taskmanager/taskmanager_server.c:#define ZBX_TM_PROCESS_PERIOD                5

For the tests that involve tasks we must wait for at least 5 seconds before stopping the server to ensure the task was processed. The use of "sleep" is rather inconvenient, instead, we would like to set the frequency to 1 second. The configuration option could be something like:

### Option: TaskManagerFrequency                                                                                                                                                                                    
#       How often the task manager process of Zabbix server will process tasks (in seconds).                                                                                                               
#                                                                                                                                                                                                                   
# Mandatory: no                                                                                                                                                                                                     
# Range: 1-30                                                                                                                                                                                                       
# Default:                                                                                                                                                                                                          
# TaskManagerFrequency=5

Generated at Wed Apr 02 17:48:35 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.