Loading of dashboard never finishes, 100% cpu usage from webserver when using piwik site with admin acc

i tried it before in the german section of the forum but i didnt get any problem-solving help(http://forum.piwik.org/read.php?5,91067). i use piwik on an ubuntu server vm with now 2 cpu threads and 1gb ram. the filesystem has enough free space (4gb+), site has around 40k hits a month and the installation is 15 month old i think.

Since the last update/the linux kernel time bug i have the problem that when i open the dashboard on my rootacc the whole server seems to freeze with top showing 100% cpu usage for several minutes until data is shown.

even when the rest finally is loading the overview widget where you can change the timeframe that is shown (days, weeks, month etc) never finishes. the whole leap second thing let me research in that direction but that should have been done with after a reboot.

if i dont use my root acc now to look at the dashboard and instead use a secondary non-admin acc everything loads fine in reasonable time and the cpu usage is 35% at a maximum.

I reinstalled piwik on the filesystem without any change.

So any ideas what might be wrong and how to fix it?

thanks in advance

Here is a thread with some similar issues, your post remindedme of the problem take a look at some of the ideas and see if any apply to help you. Good luck.


Please setup: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo

And also try: Installation - Analytics Platform - Matomo

well i had archiving already set up since i installed piwik.
i went and checked the archive-thing again and i found that i had set up user and global crontab and the global one never seemed to work. so i edited the user crontab of www-data which had still the old archive.sh in it - i changed it and tested afterwards…well nothing got better the archiving itself took longer but the dashboard still needs 5minutes to load with the admin account.

the other thing:
"Where file-based session storage may be insecure (e.g., in some shared hosting environments) or where you have to share session data between servers (e.g., load balanced web servers), you can instead use the database to store session data."
does not sound like it is applying here. but i will try it and report back later.

edit: my config/config.ini.php does not have a General section?! I added the line
"session_save_handler = dbtable" at the end.

i think i must again emphasize that i can login with the admin account into the dashboard and the server goes to hell and then logout and login again as a normal user with viewing rights on all subsites into the dashboard, from the same pc with the same browser and everything loads just fine. this should mean that there is something else wrong and its not related to any of these suggestions…?

@ lesjokolat
thanks for trying to help.
like i wrote in my first post i already inserted the date -u -s "$(date -u -R)"
and did multiple reboots which did not resolve the issue. those were the only suggestions in your link i think.

Please add

session_save_handler = dbtable

at the end of the config.ini.php file

yes i did as you ask with no change…
edit: i checked the crontab again and also tailed the output and it worked just to finish the archiving point

Did you select “Allow browser archiving = NO” in Settings > General settings?

yes its checked as “no”

if it’s set to NO and the dashboard still does not load… then there is another problem, maybe a bug in PHP?
could you upgrade your PHP and apache ?

are you sure its nothing with the piwik installation because like i said earlier when i log in with another acc into the dashboard everything is smooth as it ever was? this confuses me…you did understand me fully when i said the dashboard does load but only the main widget with the overview of hits and the visitor country widget does not?

php version on the server is 5.3.5
apache 2.2.17
so that doesnt sound very outdated when i check current versions.

i am sceptical and afraid of the work the upgrading of the webserver/php will bring me :confused:

on your screenshots I see that all widgets do not load.

the fact that it takes 100% of CPU really makes me think that piwik triggers the archiving, whic you said you disabled in the settings, so I’m not sure what else could be problem unfortunately

you can also try latest version: 301 Moved Permanently
but i don’t remember we fixed a bug like this

ok i make more screenshots, sry for that!

both are taken 5sec after hitting f5 in on the dashboard

with admin acc:
with admin

with a non admin acc:
with a non admin acc

on the admin screenshot you can see the widget that never finishes loading (its the overview one like already stated…which does load without problems on the nonadmin acc as you can see. its the topleft widget on that screenshot)

edit: damn they dont scale! :confused: had to insert the urls again.

it seems this is for a day that is already finished in your time, there should be archived and return without problem…

after going 100%, does it finish loading at some point? or hit the PHP excecution time limit?
do you see any error in error log after the CPU is back to normal?

yes its archived and yes its 8:30am here and the shown day was yesterday

no the widget never finishes loading

or hit the PHP excecution time limit?
do you see any error in error log after the CPU is back to normal?[/quote]
about which logfile are we talking here?
here a pic of the /var/log/apache2/error.log (ignore the q :q, i forgot how the quit the tail :P). the last two logentries are related to the last refresh

Could oyu pleas post the error message with "Maximum exec time in …/Date.php " fully so I can see the line numbner? thanks

this is the full error message?? the resolution on the server is just too low…

It says on “line 0” but it can’t be there must be more :slight_smile:

well what do you want me to do? i think you could spare yourself some time if you accept the “0” :stuck_out_tongue:

what about the other error message with getfirstrow() ?

Please try to remove the widgets which are not loading and re-add them.

simple yet interesting approach :stuck_out_tongue:
well now the widget is instantly loading with the rest of the other widgets - so it fixed that. but still the cpu load reaches 100% for several minutes…so that may infact not be related to the not loading widget…

also, matt, you got your line number now thanks to the readding of the widget it seems: