From aea38065901408c8b6d0bb0b619f21fd81fc9347 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 10 May 2020 21:34:12 +0200 Subject: Attempt to reduce max memory usage during actualize (#2955) * Attempt to reduce max memory usage during actualize #Fix https://github.com/FreshRSS/FreshRSS/issues/2952 * Use memory_get_peak_usage --- app/actualize_script.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/actualize_script.php') diff --git a/app/actualize_script.php b/app/actualize_script.php index 399f7b18e..e77d637cf 100755 --- a/app/actualize_script.php +++ b/app/actualize_script.php @@ -69,6 +69,7 @@ foreach ($users as $user) { fwrite(STDERR, 'FreshRSS write access problem in ' . join_path(USERS_PATH, $user, 'log.txt') . "\n"); } } + gc_collect_cycles(); } Minz_Log::notice('FreshRSS actualize done.', ADMIN_LOG); @@ -78,6 +79,7 @@ if (defined('STDOUT')) { $duration = date_diff($end_date, $begin_date); fwrite(STDOUT, 'Ending feed actualization at ' . $end_date->format('c') . "\n"); //Unbuffered fwrite(STDOUT, 'Feed actualizations took ' . $duration->format('%a day(s), %h hour(s), %i minute(s) and %s seconds') . ' for ' . count($users) . " users\n"); //Unbuffered + fwrite(STDOUT, 'Memory usage: ' . format_bytes(memory_get_peak_usage(true)) . "\n"); //Unbuffered } echo 'End.', "\n"; ob_end_flush(); -- cgit v1.2.3