grafana数据选择长周期时显示不全Internal Server Error 500 错误

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服务后发现问题解决

 

 

posted @ 2022-02-09 15:53  希曼博客  阅读(555)  评论(0编辑  收藏  举报