Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-14887

Zabbix proxy can send only up to 2000 auto registered hosts per second

XMLWordPrintable

    • Sprint 43, Sprint 44, Sprint 45
    • 0.5

      Register 15000 hosts on Zabbix proxy
      Start Zabbix server and see that only 2000 hosts are sent in at once, then datasender sleeps in my case for 5 seconds, due to datasender frequency.

      Expected:
      It sends 10000 values, then does not sleep and sends 5000 more

      Following patch improves situation as it will not fail when *records_num grows to 2000

      Index: src/libs/zbxdbhigh/proxy.c
      ===================================================================
      --- src/libs/zbxdbhigh/proxy.c	(revision 85065)
      +++ src/libs/zbxdbhigh/proxy.c	(working copy)
      @@ -1985,7 +1985,7 @@
       	}
       	DBfree_result(result);
       
      -	if (ZBX_MAX_HRECORDS == *records_num)
      +	if (ZBX_MAX_HRECORDS == *records_num - records_num_last)
       		*more = ZBX_PROXY_DATA_MORE;
       
       	zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%d lastid:" ZBX_FS_UI64 " more:%d size:" ZBX_FS_SIZE_T,
      

      Later there is code that will never be executed because ZBX_MAX_HRECORDS_TOTAL equal 10000 and it will never be reached

      	while (ZBX_DATA_JSON_BATCH_LIMIT > j->buffer_offset)
      	{
      		proxy_get_history_data_simple(j, ZBX_PROTO_TAG_AUTO_REGISTRATION, &areg, lastid, &id, &records_num,
      				more);
      
      		if (ZBX_PROXY_DATA_DONE == *more || ZBX_MAX_HRECORDS_TOTAL < records_num)
      			break;
      	}
      

            MVekslers Michael Veksler
            vso Vladislavs Sokurenko
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: