Zabbix http error 500

Type: Problem report

  • Type:


    Problem report

  • Status:

    Closed


  • Priority:


    Minor

  • Resolution:

    Fixed


  • Affects Version/s:



    3.4.10

  • Fix Version/s:



    None


  • Environment:

    Hide

    $ lsb_release -a

    No LSB modules are available.

    Distributor ID: Ubuntu

    Description: Ubuntu 16.04.4 LTS

    Release: 16.04

    Codename: xenial

    $ dpkg -l |grep zabb

    ii percona-zabbix-templates 1.1.8-1.trusty all Percona Monitoring Plugins for Zabbix

    ii zabbix-agent 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — agent

    ii zabbix-frontend-php 1:3.4.10-1+trusty all Zabbix network monitoring solution — PHP front-end

    ii zabbix-get 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — get

    ii zabbix-java-gateway 1:3.4.10-1+trusty all Zabbix network monitoring solution — java-gateway

    ii zabbix-release 3.4-1+trusty all Zabbix official repository configuration

    ii zabbix-sender 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — sender

    ii zabbix-server-mysql 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — server (MySQL)

    Show

    $ lsb_release -a

    No LSB modules are available.

    Distributor ID: Ubuntu

    Description: Ubuntu 16.04.4 LTS

    Release: 16.04

    Codename: xenial

    $ dpkg -l |grep zabb

    ii percona-zabbix-templates 1.1.8-1.trusty all Percona Monitoring Plugins for Zabbix

    ii zabbix-agent 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — agent

    ii zabbix-frontend-php 1:3.4.10-1+trusty all Zabbix network monitoring solution — PHP front-end

    ii zabbix-get 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — get

    ii zabbix-java-gateway 1:3.4.10-1+trusty all Zabbix network monitoring solution — java-gateway

    ii zabbix-release 3.4-1+trusty all Zabbix official repository configuration

    ii zabbix-sender 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — sender

    ii zabbix-server-mysql 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — server (MySQL)

Steps to reproduce:

  1. Execute the following curl commands:
curl -i -X POST -H 'Content-type:application/json' -d '{"jsonrpc":"2.0","method":"user.login","params":{ "user":"myuser","password":"mypassword"},"auth":null,"id":0}' http:
  1. Navigate to screen title…
  2. Click on screen element…

Result:
See screenshot…
See log file…
See memory dump…
Expected:
See screenshot….
See attached patch file…

Describe the bug
When try to get metrics from group of hosts (more than 50) —> Error ‘request failed, status: 500 Internal Server Error’
Can it be from plugin error, because with old (3version) plugin it worked normal?

t=2021-12-04T16:09:53+0300 lvl=dbug msg="Publication successful" logger=live user=16 channel=grafana/dashboard/uid/dtx8-Ednk
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Querying for data source via SQL store" logger=datasources id=5 orgId=1
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Initializing new data source instance" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Zabbix request" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=apiinfo.version
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Got Zabbix version" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource version=54.000
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Zabbix request" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=apiinfo.version
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Zabbix request" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=hostgroup.get
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Successfully authenticated" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource url=http://ZABBBIX_XXX/api_jsonrpc.php user=XXX
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Zabbix request" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=hostgroup.get
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Writing result to cache" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=hostgroup.get
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Zabbix request" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=host.get
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Writing result to cache" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=host.get
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Zabbix request" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=item.get
t=2021-12-04T16:09:59+0300 lvl=eror msg="Zabbix API request error" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource error="request failed, status: 500 Internal Server Error"
t=2021-12-04T16:09:59+0300 lvl=eror msg="Request Completed" logger=context userId=16 orgId=1 uname=XXXXX method=POST path=/api/datasources/5/resources/zabbix-api status=500 remote_addr=XXX.XXX.XXX.XXX time_ms=5375 size=95 referer="https://grafana.XXX.ru/d/dtx8-Ednk/network-interfaces-utilization?orgId=1&editPanel=4"

request failed, status: 500 Internal Server Error Object status:500 statusText:"Internal Server Error" data:Object error:"Internal Server Error" message:"request failed, status: 500 Internal Server Error" config:Object url:"api/datasources/5/resources/zabbix-api" method:"POST" headers:Object hideFromInspector:false data:Object retry:0 message:"request failed, status: 500 Internal Server Error"
image

I am using Powerquery to fetch the data from Zabbix using their API. It works fine when I fetch the data for some days, but as I increase the period and the amount of data surpasses the millions of rows I just get the error below after some time waiting, and the query doesn’t return anything.

enter image description here

I am using Web.contents to get the data as follows:

enter image description here

I have added that timeout as you can see above but the error just happens much before 5 minutes have passed. How should I solve this? Are there ways to fetch large amounts of data in power query in parts, without being all at once? Or does this error happen because of connection parameters inherent to zabbix configs.?

My team changed all the possible parameters regarding server memory and nothing seemed to have worked. One thing to notice is that, although power query seems to face the same error (500) internal server error if I get data for a period of 3 days or 30 days, for the first case it shows the error much faster while in the last case it takes much more time and eventually gets to the same error.

Thanks!

asked Nov 22, 2021 at 19:27

Kunis's user avatar

KunisKunis

5567 silver badges23 bronze badges

It’s a PHP memory limit hit, you should modify the maximum memory.

For example, in an Apache standard setup you should edit /etc/httpd/conf.d/zabbix.conf and modify the php_value memory_limit to a greater value (restart apache!).

The default is 128M, the «right» setting depends on the memory available on the system and the maximum data size you want to get.

answered Nov 23, 2021 at 11:14

Simone Zabberoni's user avatar

Simone ZabberoniSimone Zabberoni

1,9831 gold badge9 silver badges15 bronze badges

5

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Zabbix failed another network error
  • Zabbix error ssh2 library not found
  • Zabbix error in query
  • Zabbix error connecting to database too many connections
  • Zabbix error connecting to database mysql

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии