Issue with the log file for the usage statistics

Hi all,

I am using OJS 3.4.0.3. I am getting notification emails that something is wrong with the statistics and link to the statistics log. In the log I can see the error:

Skipped log file ...../files/usageStats/processing/usage_events_20250319.log because statistics from that month have already been calculated. To recalculate statistics for a previous month, you must restore all of that month's log files and use the CLI tool to reprocess statistics.

As I understand this file has been already processed, but somehow is still present and causes the issue. I just wanted to delete it and solve the problem. But I can not fined it.

Can you please help me what to do, to stop gettign the emails? (I don’t bother with the statistics for that time period, so no issue with that).

Regards, Primož

@bozana Maybe you have a hint?

Hi @primozs,

Do you see that file in the files folder, under usageStats/processing ?

It seems to me like that file could not be successfully processed back then, that’s why it is in the folder processing, and each time the usage stats logs are processed (every day) also the files from the folder processing are considered. Because now is April, it says that only one file from March cannot be processed – it would overwrite the current sum for that month in the DB table.
In the scheduled task log file from that day (19.03.) or day after that (20.03.), or maybe even in any scheduled task log file from March, you could eventually see what was the problem with processing that file.
If you do not mind about that day usage stats, you could also move that file from processing to the archived folder, instead of deleting it.

Best,
Bozana

Hi @bozana,

thank you for your help.
Your explanation confirms my understandings, so I am glad that my thoughts were correct :slight_smile:

I have found the problematic file under the directory stage and will move it in the archive (I don’t mind the statistics for that day). The problem is that I have no direct access to the files directory and have been only guessing subdirectories. Now I got complete directory tree under the usageStats and found the subdirectory stage I have not been aware of :slight_smile:

Hopefully this will be solved now. Thank you for your help!

Regards, Primoz