From cbac3133c5875b28addebf2741593ec1e4048670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20S=CC=8Cakalys?= Date: Mon, 29 Nov 2021 10:40:48 +0200 Subject: [PATCH] Increased the reserved memory from 10k to 32k The ErrorHandler's job includes handling out of memory (OOM) exceptions, therefore it is imoprtant that that feature works. In the current state, when handling OOM exceptions, the error handler produces an OOM error itself, because the old 10k reserve is apparently not enough anymore. To mitigate that, the reserved memory gets bumped to 32k (which is enouogh). --- src/Symfony/Component/Debug/ErrorHandler.php | 2 +- src/Symfony/Component/ErrorHandler/ErrorHandler.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Debug/ErrorHandler.php b/src/Symfony/Component/Debug/ErrorHandler.php index fd22f201adef6..99791f9aad9f3 100644 --- a/src/Symfony/Component/Debug/ErrorHandler.php +++ b/src/Symfony/Component/Debug/ErrorHandler.php @@ -119,7 +119,7 @@ class ErrorHandler public static function register(self $handler = null, $replace = true) { if (null === self::$reservedMemory) { - self::$reservedMemory = str_repeat('x', 10240); + self::$reservedMemory = str_repeat('x', 32768); register_shutdown_function(__CLASS__.'::handleFatalError'); } diff --git a/src/Symfony/Component/ErrorHandler/ErrorHandler.php b/src/Symfony/Component/ErrorHandler/ErrorHandler.php index 4c4d7dc361cb9..9e523fd4c11f4 100644 --- a/src/Symfony/Component/ErrorHandler/ErrorHandler.php +++ b/src/Symfony/Component/ErrorHandler/ErrorHandler.php @@ -111,7 +111,7 @@ class ErrorHandler public static function register(self $handler = null, bool $replace = true): self { if (null === self::$reservedMemory) { - self::$reservedMemory = str_repeat('x', 10240); + self::$reservedMemory = str_repeat('x', 32768); register_shutdown_function(__CLASS__.'::handleFatalError'); }