update error: PHP Fatal error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

update error: PHP Fatal error

Post 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?
Everybody is somebody else’s weirdo
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: update error: PHP Fatal error

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
bolson

Re: update error: PHP Fatal error

Post 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?
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: update error: PHP Fatal error

Post 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
Everybody is somebody else’s weirdo
bolson

Re: update error: PHP Fatal error

Post by bolson »

Which method are you using to upgrade from 5.6 to 5.7?
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: update error: PHP Fatal error

Post by JohnFLi »

the 'check for updates' button
Everybody is somebody else’s weirdo
bolson

Re: update error: PHP Fatal error

Post by bolson »

Try upgrading using this guide.

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

Thank you!
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: update error: PHP Fatal error

Post 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]#
Everybody is somebody else’s weirdo
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: update error: PHP Fatal error

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: update error: PHP Fatal error

Post by JohnFLi »

I am not able to find sourceguardian.ini anywhere.

Attached in the php.ini file
You do not have the required permissions to view the files attached to this post.
Everybody is somebody else’s weirdo
Locked