8000 [Debug][ErrorHandler] Increased the reserved memory from 10k to 32k by sakalys · Pull Request #44327 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Debug][ErrorHandler] Increased the reserved memory from 10k to 32k #44327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to 8000 file
Failed to load files.
Loading
Diff view
Diff view
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).
  • Loading branch information
8000
sakalys committed Nov 29, 2021
commit cbac3133c5875b28addebf2741593ec1e4048670
2 changes: 1 addition & 1 deletion src/Symfony/Component/Debug/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/ErrorHandler/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
0