ALERT - script tried to increase memory_limit
Moderators: Developers, Moderators
-
- Posts: 6
- Joined: Mon Jul 26, 2010 6:23 am
ALERT - script tried to increase memory_limit
Hello,
I'm having the following problem below. These are the logs from the syslog.
Jul 26 08:20:01 satellite /USR/SBIN/CRON[6263]: (www-data) CMD (php /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log)
Jul 26 08:20:01 satellite suhosin[6264]: ALERT - script tried to increase memory_limit to 285212672 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '/usr/share/cacti/site/poller.php', line 171)
Jul 26 08:20:01 satellite suhosin[6267]: ALERT - script tried to increase memory_limit to 285212672 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '/usr/share/cacti/site/cmd.php', line 33)
Jul 26 08:20:01 satellite suhosin[6267]: ALERT - script tried to increase memory_limit to 4294967295 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file 'unknown')
Jul 26 08:20:01 satellite suhosin[6270]: ALERT - script tried to increase memory_limit to 285212672 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '/usr/share/cacti/site/cmd.php', line 33)
Jul 26 08:20:01 satellite suhosin[6270]: ALERT - script tried to increase memory_limit to 4294967295 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file 'unknown')
Jul 26 08:20:02 satellite suhosin[6264]: ALERT - script tried to increase memory_limit to 4294967295 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file 'unknown')
What could this be? Grateful for the help.
I'm having the following problem below. These are the logs from the syslog.
Jul 26 08:20:01 satellite /USR/SBIN/CRON[6263]: (www-data) CMD (php /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log)
Jul 26 08:20:01 satellite suhosin[6264]: ALERT - script tried to increase memory_limit to 285212672 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '/usr/share/cacti/site/poller.php', line 171)
Jul 26 08:20:01 satellite suhosin[6267]: ALERT - script tried to increase memory_limit to 285212672 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '/usr/share/cacti/site/cmd.php', line 33)
Jul 26 08:20:01 satellite suhosin[6267]: ALERT - script tried to increase memory_limit to 4294967295 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file 'unknown')
Jul 26 08:20:01 satellite suhosin[6270]: ALERT - script tried to increase memory_limit to 285212672 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '/usr/share/cacti/site/cmd.php', line 33)
Jul 26 08:20:01 satellite suhosin[6270]: ALERT - script tried to increase memory_limit to 4294967295 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file 'unknown')
Jul 26 08:20:02 satellite suhosin[6264]: ALERT - script tried to increase memory_limit to 4294967295 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file 'unknown')
What could this be? Grateful for the help.
-
- Posts: 6
- Joined: Mon Jul 26, 2010 6:23 am
Did you increase it in the php.ini file and then restart the Apache service?flaviobatistela wrote:I increased the memory in php.ini to 4096M, but even so, the messages in the log, keep coming.
If so, what does it say under "System Utilities -> Technical Support" now? If it still says you need to increase your memory at the same level as it did originally, then you may not have increased it in the correct spot or you have not restarted the Apache service.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
This is the new suhosin PHP module that prevents a PHP binary from doing some nasty things, like increasing your memory beyond the available bytes.
The Cacti Group is going to have to do something about this as we set the PHP Memory limit quite high on to accommodate all systems sizes. I just had to make a change to Boost to let it be more conservative for "little" systems.
Run the following command:
And fix the memory limit in the files to match your system in the mean time.
TheWitness
The Cacti Group is going to have to do something about this as we set the PHP Memory limit quite high on to accommodate all systems sizes. I just had to make a change to Boost to let it be more conservative for "little" systems.
Run the following command:
Code: Select all
grep -r memory_limit <path_cacti>/*
TheWitness
Last edited by TheWitness on Tue Jul 27, 2010 8:12 am, edited 2 times in total.
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?
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?
-
- Posts: 6
- Joined: Mon Jul 26, 2010 6:23 am
In System Utilities -> Technical Support, says:Voiper99 wrote:Did you increase it in the php.ini file and then restart the Apache service?flaviobatistela wrote:I increased the memory in php.ini to 4096M, but even so, the messages in the log, keep coming.
If so, what does it say under "System Utilities -> Technical Support" now? If it still says you need to increase your memory at the same level as it did originally, then you may not have increased it in the correct spot or you have not restarted the Apache service.
PHP Information
PHP Version 5.3.2-1
PHP OS Linux
Satellite.abcrede.com.br PHP uname Linux 2.6.26-2-amd64 # 1 SMP Sun Jun 20 20:16:30 UTC 2010 x86_64
PHP SNMP Installed
max_execution_time 30
memory_limit 4096M
I increased the memory in the following file:
/etc/php5/apache2/php.ini, and restarted apache.
Is this correct?
-
- Posts: 6
- Joined: Mon Jul 26, 2010 6:23 am
There appeared nothing in the output of the command.TheWitness wrote:This is the new suhosin PHP module that prevents a PHP binary from doing some nasty things, like increasing your memory beyond the available bytes.
The Cacti Group is going to have to do something about this as we set the PHP Memory limit quite high on to accommodate all systems sizes. I just had to make a change to Boost to let it be more conservative for "little" systems.
Run the following command:
And fix the memory limit in the files to match your system in the mean time.Code: Select all
find <path_cacti> -name memory_limit
TheWitness
Code: Select all
satellite: ~ # find /usr/share/cacti -name memory_limit
What files should I change the memory?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Wrong command. Sorry, my bad. Here is the correct command.
Then "REDUCE" the memory limit to something your system can handle. 4096M is like 4GBytes. Likely too high.
TheWitness
Code: Select all
cd <path_cacti>
grep -r memory_limit *
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?
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?
-
- Posts: 6
- Joined: Mon Jul 26, 2010 6:23 am
Observe the output of the command:TheWitness wrote:Wrong command. Sorry, my bad. Here is the correct command.
Then "REDUCE" the memory limit to something your system can handle. 4096M is like 4GBytes. Likely too high.Code: Select all
cd <path_cacti> grep -r memory_limit *
TheWitness
satellite:~# grep -r memory_limit /usr/share/cacti/site/*
/usr/share/cacti/site/cmd.php:ini_set("memory_limit", "4096M");
/usr/share/cacti/site/poller.php:ini_set("memory_limit", "272M");
/usr/share/cacti/site/utilities.php: $max_memory = ini_get("memory_limit");
/usr/share/cacti/site/utilities.php: ini_set("memory_limit", "32M");
/usr/share/cacti/site/utilities.php: ini_set("memory_limit", $max_memory);
/usr/share/cacti/site/utilities.php: print " <td class='textArea'>memory_limit</td>\n";
/usr/share/cacti/site/utilities.php: print " <td class='textArea'>" . ini_get("memory_limit");
/usr/share/cacti/site/utilities.php: if (memory_bytes(ini_get('memory_limit')) < $memory_suggestion) {
/usr/share/cacti/site/utilities.php: print "<br><font color='red'>It is highly suggested that you alter you php.ini memory_limit to " . memory_readable($memory_suggestion) . " or higher. This suggested memory value is calculated based on the number of data source present and is only to be used as a suggestion, actual values may vary system to system based on requirements.</font><br>";
I have to change what files? And what value should I put?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Code: Select all
/usr/share/cacti/site/cmd.php:ini_set("memory_limit", "4096M");
/usr/share/cacti/site/poller.php:ini_set("memory_limit", "272M");
/usr/share/cacti/site/utilities.php: ini_set("memory_limit", "32M");
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?
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?
-
- Posts: 6
- Joined: Mon Jul 26, 2010 6:23 am
Now everything is OK. No longer appears in the error logs. But I still get an error that I do not know what it means.TheWitness wrote:These ones. They need to be <= total memory. Actually, remove the third one altogether or remove them all and simply let the one in php.ini do all the heavy lifting.Code: Select all
/usr/share/cacti/site/cmd.php:ini_set("memory_limit", "4096M"); /usr/share/cacti/site/poller.php:ini_set("memory_limit", "272M"); /usr/share/cacti/site/utilities.php: ini_set("memory_limit", "32M");
TheWitness
See the error below:
Jul 28 16:05:01 satellite /USR/SBIN/CRON[4317]: (www-data) CMD (php /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log)
Jul 28 16:09:01 satellite /USR/SBIN/CRON[4338]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm)
-
- Posts: 8
- Joined: Fri Jun 29, 2012 7:25 am
Re: ALERT - script tried to increase memory_limit
Code: Select all
attacker 'REMOTE_ADDR not set', file 'unknown'
-
- Cacti Pro User
- Posts: 613
- Joined: Tue Aug 29, 2006 4:09 pm
- Location: NL
Re: ALERT - script tried to increase memory_limit
For Debian people that find this via Google: This is described in Debian bug 668157, and as long as it is not fixed, you should provide a proper memory_limit in /etc/php5/cli/php.ini yourself.
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Who is online
Users browsing this forum: No registered users and 5 guests