Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 31473664 bytes) in /var/www/html/vendor/twig/twig/src/Template.php on line 345

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/vendor/twig/twig/src/Template.php:345) in /var/www/html/vendor/symfony/http-foundation/Session/SessionUtils.php on line 52
Error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 31473664 bytes) (500 Internal Server Error)

Symfony Exception

OutOfMemoryError

HTTP 500 Internal Server Error

Error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 31473664 bytes)

Exception

Symfony\Component\ErrorHandler\Error\ OutOfMemoryError

Show exception properties
Symfony\Component\ErrorHandler\Error\OutOfMemoryError {#41010
  -error: array:4 [
    "type" => 1
    "message" => "Allowed memory size of 268435456 bytes exhausted (tried to allocate 31473664 bytes)"
    "file" => "/var/www/html/vendor/twig/twig/src/Template.php"
    "line" => 345
  ]
}
  1. }
  2. public function display(array $context, array $blocks = []): void
  3. {
  4. foreach ($this->yield($context, $blocks) as $data) {
  5. echo $data;
  6. }
  7. }
  8. public function render(array $context): string
  9. {

Logs 2

Level Channel Message
INFO 20:57:39 php User Deprecated: Since symfony/ux-toggle-password 2.29.0: The package is deprecated and will be removed in 3.0. Follow the migration steps in https://github.com/symfony/ux/tree/2.x/src/TogglePassword to keep using TogglePassword in your Symfony application.
{
    "exception": {}
}
INFO 20:57:39 php User Deprecated: Method "Symfony\Component\Console\Command\Command::configure()" might add "void" as a native return type declaration in the future. Do the same in child class "App\Command\UpdateWaitingListCommand" now to avoid errors or add an explicit @return annotation to suppress this message.
{
    "exception": {}
}
INFO 20:57:39 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "90a60b"
    },
    "request_uri": "http://periscolaire.apeeel1.lu/_profiler/90a60b?panel=db&type=request",
    "method": "GET"
}
ERROR 20:57:48 app_log An unexpected error occurred
{
    "exception": {}
}
CRITICAL 20:57:48 request Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\OutOfMemoryError: "Error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 31473664 bytes)" at Template.php line 345
{
    "exception": {}
}

Stack Trace

OutOfMemoryError
Symfony\Component\ErrorHandler\Error\OutOfMemoryError:
Error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 31473664 bytes)

  at vendor/twig/twig/src/Template.php:345