# OutOfMemoryException - EscaperExtension.php

**URL:** <https://forum.mautic.org/t/outofmemoryexception-escaperextension-php/29929>\
**Category:** Mautic 4 Install/Upgrade Support\
**Created:** [November 12, 2023, 8:24pm UTC](https://forum.mautic.org/t/outofmemoryexception-escaperextension-php/29929 "2023-11-12T20:24:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [November 12, 2023, 8:24pm UTC](https://forum.mautic.org/t/outofmemoryexception-escaperextension-php/29929/1 "2023-11-12T20:24:26Z")

</div>

Did anyone experience problems with the escaperextension.php ? I have now at least two instances that throw errors with it once in a while, which ends up with PHP requesting up to 50GB RAM… crashing mautic.

Its related to this: /docroot/vendor/twig/twig/src/Extension/EscaperExtension.php

Error Message: mautic.ERROR: Symfony\Component\Debug\Exception\OutOfMemoryException: Error: Allowed memory size of 536870912 bytes exhausted (t  
ried to allocate 46870246080 bytes) - in file /XXXX/docroot/vendor/twig/twig/src/Extension/EscaperExtension.php - a  
t line 204

In a contao forum I found the information, that upgrading to PHP 8.1.5 solved it:

> **[4.13.x Backend und Install nicht erreichbar](https://community.contao.org/de/showthread.php?82960-Backend-und-Install-nicht-erreichbar)**
>
> Seit dem automatischen Composerupdate auf 1.5.5 komme ich bei zwei Seiten nicht mehr ins Backend und Installtool. Es erscheint eine blanke Seite und eine Fehlermeldung, dass der Server vorübergehend nicht erreichbar ist. 
>  
> Im Logfile habe ich den...

Is there any other solution, as PHP 8.1 is only supported with Mautic 5?  
Why does it appear now?
