Out of Memeory

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
mpahlevanzadeh
Cacti User
Posts: 50
Joined: Wed Jan 04, 2023 6:52 am
Contact:

Out of Memeory

Post by mpahlevanzadeh »

I get the following text in dmesg:
Out of memory: Killed process 1802 (php) total-vm:9187292kB, anon-rss:2984740kB, file-rss:3164kB, shmem-rss:0kB, UID:33 pgtables:9460kB oom_score_adj:0

I have 12G memory, How can I solve it?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Out of Memeory

Post by TheWitness »

Are you using cactid service or cron? Also, what plugins?
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?
mpahlevanzadeh
Cacti User
Posts: 50
Joined: Wed Jan 04, 2023 6:52 am
Contact:

Re: Out of Memeory

Post by mpahlevanzadeh »

I use cron:
*/5 * * * * root /usr/bin/php /opt/cacti/poller.php > /dev/null 2>&1
mpahlevanzadeh
Cacti User
Posts: 50
Joined: Wed Jan 04, 2023 6:52 am
Contact:

Re: Out of Memeory

Post by mpahlevanzadeh »

By the way, i have the following diffrences PHP:
#####################################
ps ax |grep -i php
5028 ? Ss 0:00 /bin/sh -c /usr/bin/php /opt/cacti/poller.php > /dev/null 2>&1
5029 ? D 1:38 /usr/bin/php /opt/cacti/poller.php
5057 ? Ss 0:00 /bin/sh -c php /opt/cacti/poller.php > /dev/null 2>&1
5058 ? D 1:36 php /opt/cacti/poller.php
5099 ? Ss 0:00 /bin/sh -c php /opt/cacti/poller.php > /dev/null 2>&1
5100 ? D 1:19 php /opt/cacti/poller.php
5153 ? Ss 0:00 /bin/sh -c php /opt/cacti/poller.php > /dev/null 2>&1
5154 ? D 1:01 php /opt/cacti/poller.php
5155 ? Ss 0:00 /bin/sh -c /usr/bin/php /opt/cacti/poller.php > /dev/null 2>&1
5156 ? D 1:02 /usr/bin/php /opt/cacti/poller.php
5195 ? Ss 0:00 /bin/sh -c php /opt/cacti/poller.php > /dev/null 2>&1
5196 ? D 0:56 php /opt/cacti/poller.php
5244 ? Ss 0:00 /bin/sh -c php /opt/cacti/poller.php > /dev/null 2>&1
5249 ? D 0:40 php /opt/cacti/poller.php
5258 ? Ss 0:00 /bin/sh -c /usr/bin/php /opt/cacti/poller.php > /dev/null 2>&1
5259 ? D 0:40 /usr/bin/php /opt/cacti/poller.php
5290 ? Ss 0:00 /bin/sh -c php /opt/cacti/poller.php > /dev/null 2>&1
5291 ? D 0:37 php /opt/cacti/poller.php
5404 pts/0 S+ 0:00 grep --color=auto -i php
##################################################################
Why do I have /usr/bin/php and php ?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Out of Memeory

Post by TheWitness »

Cacti version?
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?
mpahlevanzadeh
Cacti User
Posts: 50
Joined: Wed Jan 04, 2023 6:52 am
Contact:

Re: Out of Memeory

Post by mpahlevanzadeh »

1.2.23
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Out of Memeory

Post by TheWitness »

Get yourself on 1.2.24, and let's revisit this.
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?
mpahlevanzadeh
Cacti User
Posts: 50
Joined: Wed Jan 04, 2023 6:52 am
Contact:

Re: Out of Memeory

Post by mpahlevanzadeh »

I think it' can handle with memory_limit of php.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Out of Memeory

Post by TheWitness »

Most of my Cacti servers have 16GB - 32GB of memory, and for a few thousand hosts, that should be more than enough. I also support some very large installs that have over 300GB of memory for just the web servers. So, if this problem is repeatable, you need to start to trace it by running top and sorting by RSS and tracing the process taking all that memory. If you have a lot of users, you may have to decrease the memory limit to maybe 400MB. Most everything in Cacti, for smaller installs take less than that these days, especially with PHP7.4++.
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