Piwik Php - cache problems. Problems handling big database?

Hello Piwik community.

Great job on piwik so far! But i do have a problem if piwik has to handle bigger and several homepages at once.

I am using piwik for around ~20 subdomains. Some have around 4000 visitors a day.

The problem is the following. The last days i got a lot of different bugs which i think have to do with the size of some tables as these bugs did not occur as the datatables where smaller.

I had to set the maximum cache to 1024M as far more then 824 kB were loaded.
Following was a timeout message of php : “Fatal error: Maximum execution time of 30 seconds exceeded in /srv/www/htdocs/piwik/core/DataTable/Row.php on line 166”

To solve that i set “max_execution_time” in php to 60.

Now the system is running with 120 sec timeout and 1 GB cache. But what happens if the datatables grow even bigger?

Does a crone job solve this problem? Do i have to do a monthly backup so that the 3 main tables do not get too big?

The database looks like this at the moment:

  • piwik_log_action is about 1.2gb
  • piwik_log_visit is about 480mb
  • piwik_log_link_visit_action is about 320mb

Thanks a lot in advance.

best regards,
yato

Think you need to read the following (all of it):

http://piwik.org/docs/setup-auto-archiving/

and don’t forget to switch off archiving in your general settings