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

Zabbix-frontend HTTP 500 on tr_status.php due to memory consumption in api/CApiService.php on line 286

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 3.2.3
    • Frontend (F)
    • Debian 8

      After a recent update from 3.2.1 to 3.2.3, sometimes accessing the "Triggers" page results in a blank page (just the header is present). The page content is unable to load due to HTTP 500 Server response for tr_status.php

      See below for log entries.

      The issue is due to FastCGI(PHP) running out of memory (the default Zabbix recommended memory requirement for PHP is 128M)
      memory_limit = 128M

      Increasing the log memory only partially helps, as the following is observed:
      With default memory_limit = 128M, the page is unable to load in 75% of cases (refreshes)
      With memory_limit = 256M, the page is unable to load in 25% of cases
      WIth memory_limit = 512M, the page is unable to load only occasionally (rare)

      There's either a regression somewhere in the code, or the minimum system requirements have changed and need documenting.

      There are the following lines in /var/log/nginx.log
      2017/01/09 17:12:53 [error] 61832#0: *809 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /usr/share/zabbix/include/classes/api/services/CEvent.php on line 390" while reading response header from upstream, client: 192.168.1.106, server: zabbixnew.web24.net.au, request: "GET /tr_status.php?fullscreen=0&groupid=13&hostid=0&page=2 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "zabbix.web24.net.au", referrer: "http://zabbix.web24.net.au/tr_status.php?filter_set=1&groupid=13&hostid=0&show_triggers=1"
      2017/01/10 07:26:03 [error] 61831#0: *192250 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 81 bytes) in /usr/share/zabbix/include/classes/api/CApiService.php on line 286" while reading response header from upstream, client: 192.168.1.128, server: zabbixnew.web24.net.au, request: "GET /tr_status.php?ddreset=1 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "zabbixnew.web24.net.au", referrer: "http://zabbixnew.web24.net.au/zabbix.php?action=dashboard.view"
      2017/01/10 07:26:42 [error] 61831#0: *192250 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 81 bytes) in /usr/share/zabbix/include/classes/api/CApiService.php on line 286" while reading response header from upstream, client: 192.168.1.128, server: zabbixnew.web24.net.au, request: "GET /tr_status.php?ddreset=1 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "zabbixnew.web24.net.au", referrer: "http://zabbixnew.web24.net.au/tr_status.php?ddreset=1"

            Unassigned Unassigned
            ilyakruchinin Ilya Kruchinin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: