aboutsummaryrefslogtreecommitdiff
path: root/app/actualize_script.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2020-05-10 21:34:12 +0200
committerGravatar GitHub <noreply@github.com> 2020-05-10 21:34:12 +0200
commitaea38065901408c8b6d0bb0b619f21fd81fc9347 (patch)
tree13ca86572069d9f76d5c7f24777fa61a4a15c8f8 /app/actualize_script.php
parentbe10486f5e45148c78ab0c0a57a4056d5fc2889a (diff)
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
Diffstat (limited to 'app/actualize_script.php')
-rwxr-xr-xapp/actualize_script.php2
1 files changed, 2 insertions, 0 deletions
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();