Statistics never running

Statistics never running

by Mike Bishop -
Number of replies: 12

Hello one and all!


Have had a Google (and a Moodle) around and can't find an answer to this that actually works for me. Found plenty for older versions of Moodle, but non for my current version '2.9'. So her we go...


On visiting 'Site Administration > Reports > Statistics', i'm greeted with the lovely "Sorry, there is no available data to display". Which seems so common in this forum for older versions. Statistics is enabled, and i've tried all the tricks for older versions (zeroing out the entries in the database, setting the statistic settings to preferred times, allowing 'some time' for it to run - around 4 hours) but to no avail, i wondered if there were any pointers for this issue on newer Moodle versions (2.9.1 - currently)?


As a side note, my cron completes no problem and mentions nothing of statistics, is this normal?


Many thanks in advance,

Mike

Average of ratings: -
In reply to Mike Bishop

Re: Statistics never running

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Have you tried the advice in the 2.9 documentation about Statistics not working? - particularly regarding the Scheduled task?

In reply to Mary Cooch

Re: Statistics never running

by Mike Bishop -

Thanks for the reply Mary, appreciated.

I did read through that page and i can assure you the statistics are turned on, it wouldn't be the first time i'd have missed something obvious like that though! :p

I actually don't quite understand the following section...

"check Administration > Site administration > Plugins > Activity modules for any old hidden modules in the database which miss the files in the moodle/mod folder on your server. If you find any, they should be deleted."

Any chance you could elaborate on that?

A bit more information from my end. The platform itself has never gone live, there's only a handful of users set up and about 4 courses which myself and a college have been taking as various users, so i'm not expecting a huge amount of statistics or logs just yet.


Many thanks for your help!

In reply to Mike Bishop

Re: Statistics never running

by Mike Bishop -

Am i the only one having an issue with this? :o

I've left it 24 hours now to see if it was a slow job running, but still no data to display. Cron still has no sign of 'Statistics' and i'm pretty much exhausted on what i should be looking for now.


Any help gratefully accepted!

In reply to Mike Bishop

Re: Statistics never running

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Does your scheduled task Background processing for statistics; appear to be running - how often is it set to, or is it just the default? Sorry I can't be of more help as I am not familiar with the server side of things but hopefully this might alert others to try and respond smile

In reply to Mike Bishop

Re: Statistics never running

by Frederic Nevers -

Hi Mike, 

How  do you run your cron? Through the browser, or using the Command Line Interface option? How often does it run? 

Cheers, 

Fred

In reply to Mike Bishop

Re: Statistics never running

by Mike Bishop -

Thanks Mary and Fred!


Mary:  I actually followed your link to the letter yesterday. My settings pages are as the pics below...


 Fred: I have it set up as a Scheduled task in my Hosting CP. Using /usr/bin/php55 -q /home/sites/DOMAIN REDACTED/public_html/admin/cli/cron.php

Which appears to run fine, every 20 mins. In fact, the statistics schedule task page even says it has run the task for stats, yet the same error persists.

Attachment scheduled-task-settings.jpg
Attachment statistics-settings.jpg
In reply to Mike Bishop

Re: Statistics never running

by Frederic Nevers -

I've just looked at those values. This is again a long shot, but I have noticed your scheduled task is set to run at 50 minutes past every hour, but your cron states it should run at 2.55. I wonder if there is some sort of conflict somewhere (*highly* doubt it). Can you try to set your scheduled task, and your cron to happen at the same time? e.g. midnight? 

Also, maybe the process hangs somewhere. Can you try to change the values to something easier on the server, such as:

Max process interval: 1 week

Days to process: 1

Cheers, 

Fred

In reply to Frederic Nevers

Re: Statistics never running

by Frederic Nevers -

Did you ever try with those values? Did it make any difference at all? How about the database? Does it contain anything at all? 

Cheers, 

Fred

In reply to Frederic Nevers

Re: Statistics never running

by Mike Bishop -

Apologies Fred, my emails for this were going in to spam so never realised any had replied.

I'm not at the noffice right now, but i'll give these a try as soon as i am, and i'll report back any findings here.


Many thanks,

In reply to Mike Bishop

Re: Statistics never running

by Mike Bishop -

Just a heads up. I updated to the latest release of Moodle, and it doesn't fix the error. Is this something the devs need to look at? 

In reply to Mike Bishop

Re: Statistics never running

by Mike Bishop -

So i take it this isn't a wide spread issue?

In reply to Mike Bishop

Re: Statistics never running

by Frederic Nevers -

I personally have never seen the issue. Are the statistics table indeed empty? I really cannot think of anything but maybe those tables are somehow corrupted (long shot). If they aren't empty, can you please look for when the stats stopped running?

The tables will be something like mdl_stats_daily, mdl_stats_weekly, etc. 

Cheers, 

Fred