Page 1 of 1

GET objects/servicestatus cnt 5451 fails 15635 works

Posted: Wed Nov 20, 2019 1:11 pm
by awilson
Hi. I'm running the get object/status API call on a server that has 5451 services and it fails with the "{server} is currently unable to handle this request" error. This server has 12 CPUs and 32 GB of memory. I've tried using a browser and at the command line.

Another server with the same configuration has 15635 services and it completes.

Both systems are running RHEL 6 and Nagios is 5.4.4.

Any ideas on what to look for?

Thanks!

Re: GET objects/servicestatus cnt 5451 fails 15635 works

Posted: Wed Nov 20, 2019 1:20 pm
by scottwilkerson
You may need to increase the memory_limit in the php.ini and restart httpd

You should be able to confirm if this is the case by tailing the httpd/error_log while attempting to make the API request

Code: Select all

tail -f /var/log/httpd/error_log

Re: GET objects/servicestatus cnt 5451 fails 15635 works

Posted: Wed Dec 04, 2019 3:39 pm
by awilson
Hi. It appears that the memory limit is the issue.

Code: Select all

[Wed Dec 04 14:35:36 2019] [error] [client 10.10.20.80] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 64 bytes) in /usr/local/nagiosxi/html/backend/includes/xml2json.php on line 203

The value is currently 128M

Thanks

Re: GET objects/servicestatus cnt 5451 fails 15635 works

Posted: Wed Dec 04, 2019 3:41 pm
by scottwilkerson
I would try to bump this to 256M and restart httpd

Re: GET objects/servicestatus cnt 5451 fails 15635 works

Posted: Wed Dec 04, 2019 3:44 pm
by awilson
I doubled it to 256. That worked. Thanks!

Re: GET objects/servicestatus cnt 5451 fails 15635 works

Posted: Wed Dec 04, 2019 3:54 pm
by scottwilkerson
awilson wrote:I doubled it to 256. That worked. Thanks!
Great!

Locking thread