Suhosin memory errors with Piwik

I keep seeing this messages appear over and over in my syslog:

Apr 4 06:00:11 xx suhosin[25997]: ALERT - script tried to increase memory_limit to 4294967295 bytes which is above the allowed value (attacker ‘REMOTE_ADDR not set’, file ‘unknown’)
Apr 4 06:00:12 xx suhosin[26058]: ALERT - script tried to increase memory_limit to 134217728 bytes which is above the allowed value (attacker ‘REMOTE_ADDR not set’, file ‘/xxx/piwik/core/Piwik.php’, line 831)

This looks distinctly related to Piwik, and I can’t imagine why it would be trying to allocate 4GB of ram… anyone with any ideas or suggestions about this?

The first log message doesn’t appear to be from Piwik, i.e., since it says, file ‘unknown’.

The second log message arises because we recommend 128M minimum for archiving. This is stated in the software requirements Piwik Requirements - Analytics Platform - Matomo and you should have received a warning during installation.

If you want to suppress that log message, you can add the following line to your config/config.ini.php:


[General]
; minimum memory required, expressed in megabytes
minimum_memory_limit = 32

Note: setting the value too low may prevent the archiving process from completing.

Anthon,

Thanks for the pointer.

I did not have Suhosin installed when I installed Piwik, which is likely the reason it never threw an error. Suhosin was installed after.

According to http://www.webmasterworld.com/php/3901721.htm the answer is probably as simple as setting


suhosin.memory_limit = 128M

in /etc/php5/conf.d/suhosin.ini.

However, I don’t really want to allow any script to gobble this much memory up. Setting Piwik memory lower is probably the answer I want to go with.

Thanks again.