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

Zabbix should stop to attempt DB upgrade if server has no enough memory

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 3.4.4
    • Server (S)
    • Zabbix 3.2 upgrade to 3.4
      Zabbix server memory: 512 MB
      No swap configured
      DB size: 9 GB

      The select eventid, r_eventid from event_recovery order by r_eventid, eventid desc query (patch #3030030) may cause an issue during Zabbix DB upgrade.

      Steps to reproduce:

      1. Set up CentOS or Debian server with (512MB - 1GB RAM)
      2. Don't enable swap (or disable it)
      3. Create DB for Zabbix 3.2
      4. Generate problems to increase "event_recovery" table size to 1-2GB
      5. Start upgrade to 3.4 version

      Result CentOS 7:
      The "select eventid, r_eventid from event_recovery order by r_eventid, eventid desc" query will cause recurring "Out Of Memory" events for MySQL. At some point, the server may stack at all (if oom-killer score was adjusted for MySQL).

      Result Debian 8:
      The upgrade is running... forever? No visible issues from Zabbix server or MySQL side.
      At the same time, Zabbix will stack at "3030030" patch and will continuously run "select eventid, r_eventid from event_recovery order by r_eventid, eventid desc" query. You will see "can't allocate enough memory" error on inspection with "strace".

      Expected:
      Zabbix should add database upgrade failed error to log (with details about issue) and stop upgrade after several attempts if server has no enough memory.

            Unassigned Unassigned
            oleg.ivanivskyi Oleg Ivanivskyi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: