pkp-lib icon indicating copy to clipboard operation
pkp-lib copied to clipboard

Separate ProcessUsageStatsLogFile into several smaller jobs

Open bozana opened this issue 11 months ago • 3 comments

Big installations, that have huge log files and that use AcronPlugin for job processing, can experience timeouts. Thus, try to separate the ProcessUsageStatsLogFile into several smaller jobs, so that each job processes only e.g. 100 lines of the log file.

bozana avatar Mar 22 '24 10:03 bozana

Because the current solution works also for the huge installation, I will close this issue for now...

bozana avatar May 03 '24 15:05 bozana

Hi @bozana I am still facing too many times or run too long. The job may have previously timed out issue. This has been coming to light for a long time. I execute it by manually clicking the TryAgain button multiple times.

Screenshot 2024-07-09 155516

{
    "message": "APP\\jobs\\statistics\\ProcessUsageStatsLogFile has been attempted too many times or run too long. The job may have previously timed out.",
    "code": 0,
    "file": "\/ojs\/lib\/pkp\/lib\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/Worker.php",
    "line": 746,
    "trace": [
        {
            "file": "\/ojs\/lib\/pkp\/lib\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/Worker.php",
            "line": 505,
            "function": "maxAttemptsExceededException",
            "class": "Illuminate\\Queue\\Worker",
            "type": "->"
        },
        {
            "file": "\/ojs\/lib\/pkp\/lib\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/Worker.php",
            "line": 415,
            "function": "markJobAsFailedIfAlreadyExceedsMaxAttempts",
            "class": "Illuminate\\Queue\\Worker",
            "type": "->"
        },
        {
            "file": "\/ojs\/lib\/pkp\/lib\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/Worker.php",
            "line": 375,
            "function": "process",
            "class": "Illuminate\\Queue\\Worker",
            "type": "->"
        },
        {
            "file": "\/ojs\/lib\/pkp\/lib\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/Worker.php",
            "line": 326,
            "function": "runJob",
            "class": "Illuminate\\Queue\\Worker",
            "type": "->"
        },
        {
            "file": "\/ojs\/lib\/pkp\/classes\/core\/PKPQueueProvider.php",
            "line": 106,
            "function": "runNextJob",
            "class": "Illuminate\\Queue\\Worker",
            "type": "->"
        },
        {
            "file": "\/ojs\/lib\/pkp\/classes\/queue\/JobRunner.php",
            "line": 220,
            "function": "runJobInQueue",
            "class": "PKP\\core\\PKPQueueProvider",
            "type": "->"
        },
        {
            "file": "\/ojs\/lib\/pkp\/classes\/core\/PKPQueueProvider.php",
            "line": 135,
            "function": "processJobs",
            "class": "PKP\\queue\\JobRunner",
            "type": "->"
        },
        {
            "function": "PKP\\core\\{closure}",
            "class": "PKP\\core\\PKPQueueProvider",
            "type": "->"
        }
    ]
}

shantanu198713 avatar Jul 09 '24 10:07 shantanu198713

Same here - one usage events log file is just not processed with the same errors as OP reported. Log files are between 3 M and 21 M.

mpbraendle avatar Jul 19 '24 16:07 mpbraendle