Usage Statistics processing taking too much time or blocked

Hello,

I am writing in this forum for help about a Usage Statistics issue. I have a problem with the processing of usage_events files for Statistics production. The process, in general, looks like working fine, that is, scheduledTasks.xml is executed everyday, usage_events files are moved from “usageEventsLogs” directory to “stage” directory, from there, a file is moved to “processing” directory and finally to “archive”. The problem is that the usage_event file in the “processing” directory takes too much time to get processed (almost one day to be processed), or, other times, it gets blocked and remains there without being processed at all.

I have installed OJS 2.4.3 in my server. Could it be maybe a problem with Mysql server optimization? I don’t get to solve the issue, if anyone has an idea about what the problem could be…

Thank you,

Pablo

Hi @psreyes,

Usually the log file processing should not take so long. I’ve already processed in my local machine a file with 2 million lines, more than 500 MB in less than 2 hours.

The hardware configuration can influence on that, specially the hard disk performance (access time and transfer rate). My machine is using an old hard disk with 5400 rpm but, at the time of the processing, it wasn’t multitasking. Server machines are a different thing. They have more powerful hardware, but this needs to be shared between multiple tasks, and even multiple sites. Generally speaking, servers should process the files much faster than personal machines, even if their resources are being shared.

What is the size of your log files in general? And what is your hosting environment? Do you have a dedicated server or it’s shared between other sites?

Regards,
Bruno

Dear Bruno,

thank you for your quick and detailed reply.

The size of log files don’t usually exceed 1 MB. I am using a virtual server (1&1’s), that is a shared server. It is a Quad-Core AMD Opteron™ Processor 2352, CentOS 6.5, 2GB of memory, and total size of 47.68GB hard disk space. Maybe is it a limited system?

It could take 7-8 hours or more to process one file (maximum 1MB), so normally 2-3 files per day, which is too long, as I have to process statistics of last year (that is minimum three months :frowning: ). But even worse it is the fact that after some processed files, the process gets blocked and the actual log file remains in the processing directory until I manually remove it from there.

Many thanks for your help,

Pablo

@psreyes,

I think you can solve the processing halt problem triggering that manually on the server. Go into OJS folder and run this:

nohup php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasks.xml &

nohup will only log the php command output into a nohup file, inside OJS folder.

This will process everything that’s inside stage folder. So, first, move everything that’s inside processing and usageEventLogs (except the current day log file) to stage. Then execute the command above.

Sometimes, when the processing is taking too long, processing triggered by the OJS itself halts and the log stays inside the processing folder. I think that’s your case.

Let me know if that helps.

Cheers,
Bruno