Page 1 of 3

update error: PHP Fatal error

Posted: Mon Jul 31, 2017 1:59 pm
by JohnFLi

Code: Select all

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4294902125 bytes) in /usr/local/nagiosxi/tmp/nagiosxi/nagiosxi/basedir/html/includes/dbl.inc.php on line 2
I get the above error (twice....once before reboot, and again after reboot) when trying to update my nagios XI.

Code: Select all

Latest Available Version:	5.4.7
Installed Version:	5.4.6

any ideas?

Re: update error: PHP Fatal error

Posted: Mon Jul 31, 2017 2:43 pm
by lmiltchev
The first thing you need to try is up the "memory_limit" value in the /etc/php.ini file. Try setting it to 256M or 512M, depending on the available memory resources.
Example:

Code: Select all

memory_limit = 256M
Next restart apache:

Code: Select all

service httpd restart
Let us know if this fixed your issue.

Re: update error: PHP Fatal error

Posted: Mon Jul 31, 2017 2:54 pm
by bolson
Something is definitely up, you should not be getting near to that much RAM on an upgrade. How many hosts/services are you monitoring with this server? Do you have other web-based applications running?

Re: update error: PHP Fatal error

Posted: Mon Jul 31, 2017 3:08 pm
by JohnFLi
changed the memory limit from 128M to 256M



THe system is only running nagios
Only have 281 hosts.



Still same error when trying to update

I will increase memory limit more

Re: update error: PHP Fatal error

Posted: Mon Jul 31, 2017 3:19 pm
by bolson
Which method are you using to upgrade from 5.6 to 5.7?

Re: update error: PHP Fatal error

Posted: Mon Jul 31, 2017 3:27 pm
by JohnFLi
the 'check for updates' button

Re: update error: PHP Fatal error

Posted: Mon Jul 31, 2017 3:39 pm
by bolson
Try upgrading using this guide.

https://assets.nagios.com/downloads/nag ... nstall.pdf

Thank you!

Re: update error: PHP Fatal error

Posted: Mon Jul 31, 2017 5:52 pm
by JohnFLi
when following the guide:

Code: Select all

 nagiosxi]# ./upgrade
Archive:  sourceguardian/ixed4.lin.x86-64.zip
  inflating: /usr/lib64/php/modules/ixed.5.6.lin
Sourceguardian extension found for PHP version 5.6
Sourceguardian extension already in php.ini
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using G1VPNAG03.mydomain.local for ServerName
                                                           [  OK  ]
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 4294902125 bytes) in /tmp/nagiosxi/nagiosxi/basedir/html/includes/dbl.inc.php on line 2
[root@G1VPNAG03 nagiosxi]#

Re: update error: PHP Fatal error

Posted: Tue Aug 01, 2017 9:17 am
by tgriep
Can you post the following files from the Nagios server?
/etc/php.ini
/etc/php.d/sourceguardian.ini
There may be a setting that has to be changed.

Re: update error: PHP Fatal error

Posted: Tue Aug 01, 2017 10:17 am
by JohnFLi
I am not able to find sourceguardian.ini anywhere.

Attached in the php.ini file