Hi,
I spend the whole day with this and I’m starting to get crazy, so any help would be really appreciated.
Problem:
Most of our journals still are on an old OJS 2.4.5 (shame on me)…
All worked perfectly till a week ago (working on the OJS 3.x migration) we update the server and php versions where mixed. After some work to we manage to recover the server (rolling back to php 5.6.40) but statistics are still stuck.
I don’t user anacron (I prefer my own cron to decide the moment I ask my server to do the heavy duty…) so, in my cron, for each journal, I’m making the following calls:
$ php /home/ojs/htdocs/myjournal/tools/runScheduledTasks.php /home/ojs/webdata/myjournal/registry/scheduledTasks.xml # <--- I ignored this one, because it's not about statistics.
$ php /home/ojs/htdocs/myjournal/tools/runScheduledTasks.php plugins/importexport/crossref/scheduledTasks.xml
$ php /home/ojs/htdocs/myjournal/tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasksAutoStage.xml
$ php /home/ojs/htdocs/myjournal/tools/runScheduledTasks.php plugins/generic/alm/scheduledTasks.xml
Testing:
To see what really happens I ran the scripts outside the cron and as root (to be sure there was no permission issue)… and all commands run extremely fast (less than a second), without any feedback and don’t show any errors in logs (checked twice and forced an error to be sure I was checking the right log… and I was).
Then I check the statistics folders (at /usageStats/usageEventLogs/)… processing, reject and stage ones are empty, archive is quite full (as expected), but usageEventLogs include log files since last run (20200714).
If I check the “scheduled_tasks” table, all are from one week ago, except for the script I ran manually that looks fine to me:
plugins.generic.usageStats.UsageStatsLoader 2020-07-21 17:46:56
If I check the “metrics” table, last row it’s also from one week ago:
usage_events_20200714.log 260 1 65 730 518 20200714 202007 2 US 0 San Francisco ojs::counter 1
As is explained in some post of this forum, I confirmed the existence os “GeoLiteCity.dat” in the plugin’s folder and is fine.
The error look congruent with this patch from Bruno’s so I apply it… but nothing changes.
I really don’t know what else to check… except start tracing the code, so any help is really welcome.
Thanks a lot in advance,
m.
PD: Old documentation about this, could be found here.
For new documentation, check this