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

Elasticsearch does not reuse connections

XMLWordPrintable

    • S25-W4/5

      Every time history is pushed into elastic there is new connection established.
      Expected:
      Connection should be reused for better performance by not closing multi handle, here are required changes:

      diff --git a/src/libs/zbxhistory/history_elastic.c b/src/libs/zbxhistory/history_elastic.c
      index 3be0e7ab2ef..e95234e61a2 100644
      --- a/src/libs/zbxhistory/history_elastic.c
      +++ b/src/libs/zbxhistory/history_elastic.c
      @@ -358,12 +358,12 @@ static void       elastic_writer_release(void)
              for (i = 0; i < writer.ifaces.values_num; i++)
                      elastic_close((zbx_history_iface_t *)writer.ifaces.values[i]);
      
      -       curl_multi_cleanup(writer.handle);
      -       writer.handle = NULL;
      +       //curl_multi_cleanup(writer.handle);
      +       //writer.handle = NULL;
      
      -       zbx_vector_ptr_destroy(&writer.ifaces);
      +       zbx_vector_ptr_clear(&writer.ifaces);
      
      -       writer.initialized = 0;
      +       //writer.initialized = 0;
       }
      

            zabbix.dev Zabbix Development Team
            vso Vladislavs Sokurenko
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: