Piwik Slow/ Hanging


#1

Hi there,

I’m using Piwik 1.6, and whenever I try and use it, it is incredibly slow and unresponsive. Most of the time none of the dashboard even loads, it just says “Loading Data…”.

I’ve increased the memory_limit to 256M, and the max_input_time to 120 with no affect.

I turned on MySQL slow queries, and one query keeps coming up over and over:

SELECT GET_LOCK(‘piwik’stats.piwik_/1/1/2011-10-20,2011-10-20/767a9cb5cdee96769f2b7v2a6a8edc4f’, 1);

I also get the following errors in apache:

PHP Fatal error: Call to undefined function is_resource() in /var/www/stats/libs/Zend/Log/Writer/Stream.php on line 117

PHP Fatal error: Call to undefined function session_write_close() in /var/www/stats/libs/Zend/Session.php on line 691

Any help is much appreciated!

Thanks!


(JulienM) #2

Can you post your environment configuration ?

  • host
  • OS
  • PHP, MySQL, Apache version
  • the database php mod(s) in use
  • php accelerators (APC, eAccelerator, …)?
  • third-party Piwik plugins

is How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo activated?

have you ever encountered this issue with an older Piwik version?


#3

Host is a private Linux box we have set up for development and testing. It’s on our internal network, and the web server that hosts the site I’m tracking is in the DMZ; that said, I’ve confirmed that the two are able to communicate via HTTP/HTTPS. Does Piwik need to communicate to other servers out on the Internet?

Specs:

  • Red Hat Enterprise Linux 6.1
  • Apache 2.2.15
  • MySQL 5.1.52
  • PHP 5.3.3

I don’t think I’m using any PHP Mods, it’s just a vanilla RHEL install. No PHP Accelerators. No third party Piwik plugins. Auto archiving is not enabled; this is the first time I’ve installed Piwik, and it’s a very low traffic site, so there should be very little data.

I’ve never used an older version of Piwik, this is my first time. I’m currently just trying it out as an alternative to Google Analytics.

I’ve tried re-installing Piwik after I deleted all files and database tables with no benefit.


(vipsoft) #4

we use locks to prevent concurrent archiving; try increasing max_execution_time in php.ini.


#5

I’ve upped the max_execution_time in php.ini to 120, and now instead of the “Loading Data…” I get “Loading widget, please wait…” for each widget on the main dashboard, and if I go to Visitors, it still displays the “Loading Data…” message. So really no change.

Not sure if this is a red herring or not, but if I look in Chrome developer tools while this is going on, I get a constant firing of scripting events for Index.php on line 834:

jQuery.extend({historyCurrentHash:undefined,historyCallback:undefined,historyInit:function(d){jQuery.historyCallback=d;var c=location.hash;jQuery.historyCurrentHash=c;if((jQuery.browser.msie)&&(jQuery.browser.version<8)){if(jQuery.historyCurrentHash==""){jQuery.historyCurrentHash="#"}$(“body”).prepend(’’);var a=$("#jQuery_history")[0];var b=a.contentWindow.document;b.open();b.close();b.location.hash=c}else{if($.browser.safari){jQuery.historyBackStack=[];jQuery.historyBackStack.length=history.length;jQuery.historyForwardStack=[];jQuery.isFirst=true}}jQuery.historyCallback(c.replace(/^#/,""));setInterval(jQuery.historyCheck,100)},historyAddHistory:function(a){jQuery.historyBackStack.push(a);jQuery.historyForwardStack.length=0;this.isFirst=true},historyCheck:function(){if((jQuery.browser.msie)&&(jQuery.browser.version<8)){var a=$("#jQuery_history")[0];var d=a.contentDocument||a.contentWindow.document;var f=d.location.hash;if(f!=jQuery.historyCurrentHash){location.hash=f;jQuery.historyCurrentHash=f;jQuery.historyCallback(f.replace(/^#/,""))}}else{if($.browser.safari){if(!jQuery.dontCheck){var b=history.length-jQuery.historyBackStack.length;if(b){jQuery.isFirst=false;if(b<0){for(var c=0;c<Math.abs(b);c++){jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop())}}else{for(var c=0;c<b;c++){jQuery.historyBackStack.push(jQuery.historyForwardStack.shift())}}var e=jQuery.historyBackStack[jQuery.historyBackStack.length-1];if(e!=undefined){jQuery.historyCurrentHash=location.hash;jQuery.historyCallback(e)}}else{if(jQuery.historyBackStack[jQuery.historyBackStack.length-1]==undefined&&!jQuery.isFirst){if(document.URL.indexOf("#")>=0){jQuery.historyCallback(document.URL.split("#")[1])}else{var f=location.hash;jQuery.historyCallback("")}jQuery.isFirst=true}}}}else{var f=location.hash;if(f!=jQuery.historyCurrentHash){jQuery.historyCurrentHash=f;jQuery.historyCallback(f.replace(/^#/,""))}}}},historyLoad:function(d){var e;if(jQuery.browser.safari){e=d}else{e="#"+d;location.hash=e}jQuery.historyCurrentHash=e;if((jQuery.browser.msie)&&(jQuery.browser.version<8)){var a=$("#jQuery_history")[0];var c=a.contentWindow.document;c.open();c.close();c.location.hash=e;jQuery.historyCallback(d)}else{if(jQuery.browser.safari){jQuery.dontCheck=true;this.historyAddHistory(d);var b=function(){jQuery.dontCheck=false};window.setTimeout(b,200);jQuery.historyCallback(d);location.hash=e}else{jQuery.historyCallback(d)}}}});