From e2dbc690ac4d29000e69a12e4bfc2b8139d8ff5b Mon Sep 17 00:00:00 2001 From: Jakub Onderka Date: Mon, 8 Apr 2024 19:45:30 +0200 Subject: [PATCH] chg: [sync] Enable garbage collector when pulling events from remote server --- app/Console/Command/ServerShell.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Console/Command/ServerShell.php b/app/Console/Command/ServerShell.php index ad2d8df72..0d69a9a33 100644 --- a/app/Console/Command/ServerShell.php +++ b/app/Console/Command/ServerShell.php @@ -145,6 +145,10 @@ class ServerShell extends AppShell if (!empty($this->args[4]) && $this->args[4] === 'force') { $force = true; } + + // Try to enable garbage collector as pulling events can use a lot of memory + gc_enable(); + try { $result = $this->Server->pull($user, $technique, $server, $jobId, $force); if (is_array($result)) {