Increasing the memory

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
laaremu
Posts: 21
Joined: Tue Feb 08, 2005 2:32 pm

Increasing the memory

Post by laaremu »

Hello Guys,


I am having this error when am viewing cacti log and I checked the path below there is no avenue to increase the memory

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 79 bytes) in /var/www/html/cacti/utilities.php on line 105

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 138 bytes) in Unknown on line 0

I would be grateful if guys can help me out.


Thanks


Aremu
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

check for this setting in php.ini :

Code: Select all

memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)
Increase it, and restart Apache.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
laaremu
Posts: 21
Joined: Tue Feb 08, 2005 2:32 pm

Post by laaremu »

Hello Guys,


The error is still there.


Aremu
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

What value did you put in php.ini ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
laaremu
Posts: 21
Joined: Tue Feb 08, 2005 2:32 pm

Post by laaremu »

Hello,


I increased the memory to 64M.
I really appreciate your prompt reply.
God bless you.





Aremu
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Re: Increasing the memory

Post by fmangeant »

laaremu wrote:Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 79 bytes) in /var/www/html/cacti/utilities.php on line 105
laaremu wrote:I increased the memory to 64M.
67108864 bytes = 64 Mb :)

Try to increase it to 128 Mb (that's what I use).
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
laaremu
Posts: 21
Joined: Tue Feb 08, 2005 2:32 pm

Post by laaremu »

Hello,


After I increased the memory to 128Mb I got the error below.


Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 81 bytes) in /var/www/html/cacti/utilities.php on line 105

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 138 bytes) in Unknown on line 0

Pls help me out.
I will try to increase it again.


Thanks

Aremu
elnino
Cacti User
Posts: 205
Joined: Tue Mar 08, 2005 9:51 pm

Post by elnino »

You have to restart Apache (or whatever you're using for your webserver) for the setting to take place. Try setting it back to 64mb, restart Apache and see if you get the error
zman818
Posts: 10
Joined: Sun Aug 13, 2006 5:30 pm

Post by zman818 »

I'd say he's restarting, as the error is reporting the new, larger allowed memory size.

Here's a silly question -- how big is your log file? Sounds like it may have ballooned to an unmanageable size (by cacti's reader functions). You may need to download it and open it locally.

You might also want to check and see if you have your logging level set unnecessarily high, as this can grow the log quite quickly.
laaremu
Posts: 21
Joined: Tue Feb 08, 2005 2:32 pm

Post by laaremu »

Hello Guys,

All effort is appreciated.
Mind you there is no question that is silly or foolish as you might put it.
The size of the log file is over 500MB.
Can I delete the log file?
What will be the effect?
And re-create the log file
Elnino, I returned the memory back to 64Mb and restart apache it gave me same error.


Aremu
User avatar
nahun
Cacti User
Posts: 92
Joined: Wed Feb 15, 2006 11:27 pm
Location: Idaho
Contact:

Post by nahun »

oh wow, thats big. You can rename the current one and then `touch cacti.log` to create another one. Make sure the ownership and permissions are correct.

This way you'll have the old log just in case you want it. You can also just delete it or clear it using the web interface.
[size=75]Solaris 10 x86 [color=red][b]||[/b][/color] Cacti - 0.8.7 [color=red][b]||[/b][/color] MySQL - 5.0.45 [color=red][b]||[/b][/color] PHP - 5.2.6 [color=red][b]||[/b][/color] RRDTool - 1.2.23 [color=red][b]||[/b][/color] NET-SNMP - 5.4.1 [color=red][b]||[/b][/color] Syslog-ng 2.0.5
[url=http://www.indigo-networks.com]indigo-networks.com[/url][/size]
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Turn your logging down!!!

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests