grafana数据选择长周期时显示不全Internal Server Error 500 错误。数据源方式为zabbix api
/var/log/httpd/error_log 显示
[Wed Feb 09 14:03:01.807784 2022] [proxy_fcgi:error] [pid 17251] [client 192.168.137.105:40088] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /usr/share/zabbix/include/db.inc.PHP on line 397\n' [Wed Feb 09 14:05:40.516273 2022] [proxy_fcgi:error] [pid 7147] [client 192.168.137.105:47772] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /usr/share/zabbix/include/db.inc.PHP on line 397\n'
1. 根据网上说法, /etc/PHP.ini下修改了配置将128换成了2048
#memory_limit = 128M
memory_limit = 2048M
重启httpd服务 发现没有生效.依旧报这个错 提示内存还是128M,无效
2. 修改http/conf.d/下面的zabbix.conf 将128M换成512M
重启httpd服务再次刷新界面 依旧无效
3.对于前两种方法都无效,所以只能尝试,修改PHP页面,根据log提示,可以看出访问的PHP页面是
/usr/share/zabbix/include/db.inc.PHP
所以编辑改文件,在头部添加
set_time_limit ( 0 );
ini_set("memory_limit","-1");
重启http服务后发现问题解决
注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。