Memory usage low to medium traffic website



we have approximately 3000 visits per day on our site.

Is it with this number of visits plausible, that we run in the memory-limitation of 128MB per PHP-process?

I don’t think, that this is a so high number?

(If we raise the memory-limit per PHP-process up to 512MB the error disappears.)


(Matthieu Aubry) #2

Yes it is normal, 3000 visits is enough to go over 128M (which is not a lot for PHP when working with lot of data)


Hi Matt,

I’m glad that my memory-issues are quite normal. Not normal is the behaviour of our piwik-1.6-installation after fine-tuning the memory-settings of the php-scripts.

I set the php_memory_limitation for the apache-process to 512M, which seemed to work fine.

And I also changed the php_memory_limitation for the command line (cli) in the script \misc\cron\ I added the line

PHP_BIN = "$PHP_BIN -d memory_limit=512M"

after setting PHP_BIN in the script \misc\cron\ (Due to administrational restrictions I may not alter the php.ini for the cli and it seems, that \piwik\config\config.ini is not evaluated when launching \misc\cron\

That means every call to PHP_BIN in has now a memory_limit of 512M.

Now I have problems with my email-reports. If the reports get a little bigger the email-report-sending fails.


PHP Fatal error: Call to undefined function imagecreatefrompng() in /opt/piwik/libs/tcpdf/tcpdf.php on line 7887, referer:

If I reduce the statistics included in an email-report the email-sending works. GD is installed on the server. And no, I can’t try out 1.7beta on this system. :frowning:

Any idea what I could try?

Is it possible that - with my $PHP_BIN -d memory_limit=512M - I accidentally reduced a higher memory_limit than 512M in which causes the report-sending to fail now?

Regards, Rikky

(Matthieu Aubry) #4

Call to undefined function imagecreatefrompng --> probably GD not working properly, check your PHPINFO for GD2 etc. (or look the error online)