PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in /usr/share/zabbix/include/classes/api/CRelationMap.php on line 77
背景:在grafana配和zabbix展示数据,当拉取所有主机数据的时候,会返回500
查看错误日志发现以下错误:
总结为:php内存耗尽
尝试修改了/etc/php.ini配置文件,将memory_limit = 128M 改为memory_limit = 256M ,并重启zabbix-server发现无用
经查阅资料发现:"This was due to the puppet apache module having individual settings overriding my php.ini file under /etc/httpd/conf.d/"
修改/etc/httpd/conf.d/zabbix.conf文件,将php_value memory_limit 128M 改为 php_value memory_limit 256M,重启httpd及zabbix-server之后,可以正常拉取所有主机的数据。