Ad Widget

Collapse

1.1beta11 slow to process items

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kempkep
    Junior Member
    • Feb 2006
    • 18

    #1

    1.1beta11 slow to process items

    After upgrading from 1.1beta10 to beta11 I found zabbix was not processing items, I would have >200 sitting there for more than 5 mins.

    Have replaced with the beta10 server and am working again.

    This was on Solaris. Did not see the problem on Linux but have few items on my Linux test system.

    Anyone else had this problem ?

    With debug log level it looks like its processing okay.
  • kempkep
    Junior Member
    • Feb 2006
    • 18

    #2
    Problem solved

    Found the problem in src/libs/zbxdbhigh/db.c

    A new function was supposed to limit the number of rows returned, but the string created with snprintf to append the "limit <num rows>" is not used

    This results in the original unlimited string 'query' being used and excessive rows returned.

    Code below with bad code commented out and new code highlighted

    DB_RESULT DBselectN(char *query, int n)
    {
    char sql[MAX_STRING_LEN];
    #ifdef HAVE_MYSQL
    snprintf(sql,MAX_STRING_LEN-1,"%s limit %d", query, n);
    // return DBselect(query);
    return DBselect(sql);
    #endif
    #ifdef HAVE_PGSQL
    snprintf(sql,MAX_STRING_LEN-1,"%s limit %d", query, n);
    // return DBselect(query);
    return DBselect(sql);
    #endif
    #ifdef HAVE_ORACLE
    snprintf(sql,MAX_STRING_LEN-1,"select * from (%s) where rownum<=%d", query, n);
    // return DBselect(query);
    return DBselect(sql);
    #endif
    }

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      Please see also http://www.zabbix.com/forum/showthread.php?t=2897 for a complete list of known issues of ZABBIX 1.1beta11.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      Working...