From e71d16d6da8c5a7fe72d54264ebb511a5f4166d5 Mon Sep 17 00:00:00 2001 From: Andy Xheli <59488153+AndyXheli@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:45:36 -0500 Subject: [PATCH] update Warn on excessive memory consumption in background jobs to Info Signed-off-by: Andy Xheli Fix [Bug]: Change Warn on excessive memory consumption in background jobs to info #45682 Signed-off-by: Andy Xheli <59488153+AndyXheli@users.noreply.github.com> --- cron.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cron.php b/cron.php index 8c0311b53a777..ffefedbc9f39a 100644 --- a/cron.php +++ b/cron.php @@ -164,10 +164,10 @@ $memoryPeakAfter = memory_get_peak_usage(); if ($memoryAfter - $memoryBefore > 10_000_000) { - $logger->warning('Used memory grew by more than 10 MB when executing job ' . $jobDetails . ': ' . Util::humanFileSize($memoryAfter). ' (before: ' . Util::humanFileSize($memoryBefore) . ')', ['app' => 'cron']); + $logger->info('Used memory grew by more than 10 MB when executing job ' . $jobDetails . ': ' . Util::humanFileSize($memoryAfter). ' (before: ' . Util::humanFileSize($memoryBefore) . ')', ['app' => 'cron']); } if ($memoryPeakAfter > 300_000_000) { - $logger->warning('Cron job used more than 300 MB of ram after executing job ' . $jobDetails . ': ' . Util::humanFileSize($memoryPeakAfter) . ' (before: ' . Util::humanFileSize($memoryPeakBefore) . ')', ['app' => 'cron']); + $logger->info('Cron job used more than 300 MB of ram after executing job ' . $jobDetails . ': ' . Util::humanFileSize($memoryPeakAfter) . ' (before: ' . Util::humanFileSize($memoryPeakBefore) . ')', ['app' => 'cron']); } // clean up after unclean jobs