Memory problems, advise please

I’ve been running Piwik for a while now. First on a Linode 1024, but after a couple of months, as my site grew, Piwik kept maxing out the memory. Not sure what the problem was, but setting Apache to the lowest possible settings didn’t help. For example. When running the live update widget I could see the memory slowly being eaten away. Looked like a memory leak to me. But as I said, I’m not sure what the problem was.

So I moved Piwik to my Mediatemple (gs) server. Everything worked fine for a while. Pretty high GPU usage, but I’m not running much else on that server. So it wasn’t a problem. But now the monthly and yearly reports show ‘0’.

After some investigation I found out the archiving process was running out of memory. I understand it runs through the weekly, monthly and yearly logs every time it runs? Anyway, turns out the cron jobs on the Mediatemple (gs) server are limited to 100mb RAM, which obviously caused the monthly and yearly reports to max out. I increased the php.ini memory limit to 512MB, but I can’t change the cron limit.

Do I have any other option than to move to another server again? I’d rather keep it on the Mediatemple server, as it runs fine there (except for the archiving). I can’t move it to my main server, since it’ll crash it (although I’m not sure why). Any ideas?

Any chance of processing the logs like a batch, so it won’t run out of memory?

Or processing them from the browser (as I said, the php scripts can use more memory than the cron)? What are the negatives of letting it run in the browser when requesting a page, except for load time?

I hear crickets… :frowning:

There are tickets and many posts about this, for example: 301 Moved Permanently

[quote=matt]
There are tickets and many posts about this, for example: 301 Moved Permanently

To be fair, that’s not really answering my question.

I read most of those tickets. They don’t bring any solution to my problem.

Why can’t Piwik batch process the data without running out of memory, like awstats?

What about processing it in the browser?

Why run through all the monthly, yearly, weekly data every single time the archive script runs?

And what about the memory leaks?