Piwik Extremely Slow After Upgrade


(barryo) #1

Hi folks,

We recently upgrading to Piwik 6.x (and subsequently 7 and now 8). For all upgrades (and I cannot hand on heard attribute the issue to the upgrade), the Piwik site has become extremely slow and unusable.

We’re running on MySQL 5.1.37 (using PDO), PHP 5.3.2, Apache 2.2.14 (all on Ubuntu 10.04 LTS).

The issue seems to be that the AJAX requests are queuing up and timing out. This should be clear in the following image from Firebug:

[attachment=1731:SRP_Piwik.png]

As you can see, each AJAX request seems to die after ~30secs (although the request seems to actually work in that the dashboard is populated - eventually).

PHP’s max execution time is set to 60 secs (not a typo) and there’s no fatal exceeding max execution time in any logs. Memory to 512MB.

I’ve also tried a fresh database and a fresh install and all have the same effect.

At this point I’m pulling my hair out!

Anyone have any suggestions / solutions? Could it be an Apache config I’m missing (using the standard as installed).

Thanks and kind regards,

  • Barry

(Matthieu Aubry) #2

Please setup automatic archiving task as explained in http://piwik.org/docs/setup-auto-archiving/


(Fredy) #3

Had the same issue, your suggestion seem to have worked, thanks!


(AAApple) #4

I came here looking for this. It fixed my problem as well. Thanks!


(Matthieu Aubry) #5

It fixed the issue because probably your traffic increased recently and mysql couldn’t cope with real time stats anymore. Nothing changed in Piwik that could cause such failure AFAIK


(barryo) #6

Matthieu, thanks for the reply. Also, apologies for the delay - I thought I had turned on email notification but obviously didn’t.

We had auto archiving on all the time and unfortunately this made no difference. I have other Piwik installations without any issues and on higher load. I’ll have to move it to another server now and rule out Apache, and other platform related possibilities…


(barryo) #7

Okay, the issue was iptables and NFS. We mistakenly enabled a firewall on our internal interface. It seems most NFS requests were allow via ESTABLISHED / RELATED rules but when all the ASYNC requests from the dashboard came in, they got blocked by the firewall. I don’t have the time to fully investigate the exact sequence of events but allow all NFS traffic from our file server resolved the issue.

Thanks all for the comments and suggestions.