Website Loading Slowly Apparently Due To Piwik


#1

Hello,

I have Piwik installed on 9 different websites (great software!). On at least one of the websites I have recently (few weeks) started experiencing an issue, which is manifested as follows:

  • I will try to access the website and it takes a long time to load.
  • I will go to Pingdom’s Website Load Speed Test Tool and check the website speed (using a test server located in the same State and City as my website server). The load time will be anything from 5 to 15 seconds.
  • In the Speed Test, the vast majority of loading time is spent Waiting for a reply from the following URL (I removed private data with the name of my website and replaced it with XXXXX):

http://XXXXX.net/wp-content/piwik/piwik.php?action_name=XXXX%20XXXX%20-%20XXXXX%20XXXXX%20XXXXX%20XXXXX&idsite=1&rec=1&r=793910&h=10&m=44&s=52
&url=http%3A%2F%2FXXXXX.net%2F&_id=2010696625d6876d&_idts=1432716292&_idvc=1
&_idn=0&_refts=0&_viewts=1432716292&send_image=0&pdf=1&qt=0&realp=0&wma=0
&dir=0&fla=1&java=1&gears=0&ag=0&cookie=1&res=1280x1024&gt_ms=319

Again, it’s just the Wait time on this link that is taking up the bulk of the website load time; the Receive time is actually 1ms only.

  • A minute or two later the issue disappears and the website seems to load perfectly fine. This issue will recur repeatedly over the course of the day, typically once every few hours.

Three points to keep in mind:

  1. The above will happen both after I have just tried to login into Piwik for that particular website, as well as sometimes when I haven’t even tried accessing Piwik at all in a given day (I am the only user with access to this Piwik installation).
  2. The websites are hosted on a Virtuozzo private VPN (VZFS file system) that has way more dedicated resources than I ever use for my sites (typically I won’t exceed 30% of resources, maybe 40% on a very busy day).
  3. The above is usually isolated to one or two specific websites at most (each site has its own, separate Piwik installation) at any given time and never does it concern all the websites on my VPS simultaneously.

My webhost, after spending many hours trying to pinpoint the issue, says that it is not server related (and I believe them - they are great at what they do) and that I need help from someone who knows their way around Piwik optimization. Any help or idea what the above might be caused by?


(Matthieu Aubry) #2

Hi there,

My main suggestion would be to check you have setup the cron as explained in: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo