usageStats schedule not running

Hi All.

A few months ago I upgraded from 3.1 to 3.2 and we are now running 3.2.1-1.
It was recently brought to my attention that the statistics have not being processed since the upgrade from 3.1.

Statistics for dates prior to the upgrade are available and the metrics table is populated, it not recording any new information.

I am manually running the scheduled task with the command:
/usr/bin/php /var/www/html/tools/runScheduledTasks.php /var/www/html/plugins/generic/usageStats/scheduledTasks.xml

Running the command updates the ‘last_run’ field for ‘class_name’ plugins.generic.usageStats.UsageStatsLoader in the scheduled_tasks table.

The directory /var/www/ojsfiles/usageStats/usageEventLogs/ is full of files that have been unprocessed since the upgrade. Files do not get moved to the ‘processing’ or ‘stage’ directories and those directories are writable by the webserver. The scheduled command does run quickly (real 0m0.169s) despite there being three months worth of logs present.

The base_url has changed, but I thought this was before this problem started and in any case, it looks like the scheduled command isn’t even trying to process the log files.

I’m not really sure where next to look next so any help would be gratefully received.

Hmm, it sounds like the raw usage stats logs are not being staged for processing. I’m not very familiar with this part of the process, but my understanding is that the logs are moved from where they are created daily into a staging area and the scheduled task only processes those (you wouldn’t want to process a log that’s still being written to). Our Admin Guide includes a section on processing log files that may be helpful.

Hi, I have the same problem - after migrating from version 3.2.0-3 to 3.2.1-1, the statistics are not processed.
Logs are saved correctly in usageEventLogs.
And that’s all.
After calling Cron, I get a message:
PHP Warning: Constants may only evaluate to scalar values in …/public_html/lib/pkp/classes/db/DBConnection.inc.php on line 17
PHP Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in …/public_html/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php on line 374
scheduled_tasks = On
PHP version 7.3, even changed it to 7.2 now.
Links in the logs are the same as in base_url
I’ve run out of ideas…
Thanks for the tips
Peter