[04-Jan-2018 12:44:08 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /Users/david/Projects/sentry-defence/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php on line 122
[04-Jan-2018 12:44:20 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /Users/david/Projects/sentry-defence/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php on line 187
[04-Jan-2018 12:44:20 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /Users/david/Projects/sentry-defence/vendor/symfony/debug/Exception/FatalErrorException.php on line 1
[04-Jan-2018 12:45:16 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /Users/david/Projects/sentry-defence/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php on line 187
[04-Jan-2018 12:45:48 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /Users/david/Projects/sentry-defence/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php on line 187
[04-Jan-2018 12:45:48 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /Users/david/Projects/sentry-defence/vendor/symfony/debug/Exception/FatalErrorException.php on line 1
[04-Jan-2018 12:46:32 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 274432 bytes) in /Users/david/Projects/sentry-defence/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php on line 187
[04-Jan-2018 12:46:32 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /Users/david/Projects/sentry-defence/vendor/symfony/debug/Exception/FatalErrorException.php on line 1
Laravel 5.5.26
Debugbar 3.1.0
We're not doing anything fancy, have a resource controller with a post action to create() which is using doing things like view('foo')->with('object', $object)
The object in our case is a standard Eloquent model, which has a few relationships.
We've had to disable debugbar in our project for now :(
We managed to find out what was causing our problem, usage of another package that when being included in the stacktrace for display in debugbar was pulling in a ton of data from it's flat json database.
resolving that resolved debugar crashing out on us
Same Issue on Laravel 5.5.32
I downgraded Debugbar to 2.4.3 but not solved
Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)
any solution?
I just had the following error:
"192.168.1.20:50283 [500]: / - Allowed memory size of 134217728 bytes exhausted (tried to allocate 212992 bytes) in /Users/samsmekens/GitHub/tempproject/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php on line 38"
I found really NO way why I suddenly got this error ALL the time (couldn't access my application anymore).
I tried to clear my cache, but this didn't work. The error obviously had something to do with the app trying to load a file that was too big. So I started to check my log files. I started by deleting the directory "debugbar" under my storage directory. This immediately fixed the issue.
App running Laravel 5.4.36 with debugbar 2.4.3.
I am having the same issue, turns out that in my it's caused by @can
or Gate::allows
calls.
Conditions:
DEBUG enabled
iteration over multiple entities (e.g. DataTable etc)
calls to @can
or Gate::allows
The Policy logic itself doesn't seem to matter - I get this error even when simply returning true.
Laravel 5.5.34 / debugbar v3.1.1
The same behaviour for me. On often Gate::allows calls, the server returns 500
"Allowed memory size of 134217728 bytes exhausted (tried to allocate 360448 bytes)"
Conditions:
DEBUG enabled
calls Gate::allows
class: "Symfony\Component\Debug\Exception\FatalErrorException"
file: ".../vendor/predis/predis/src/Connection/StreamConnection.php"
line: 345
Laravel 5.4.36 / debugbar v2.4.3
Symfony\Component\Debug\Exception\FatalErrorException thrown with message "Allowed memory size of 536870912 bytes exhausted (tried to allocate 132278680 bytes)"
Stacktrace:
#0 Symfony\Component\Debug\Exception\FatalErrorException in /home/app/vendor/maximebf/debugbar/src/DebugBar/JavascriptRenderer.php:986
On Laravel 5.6 as well
deleting everything in my '\storage\debugbar' is what worked for me! Thanks so much!!!
This worked for me
Same here.
Happening only when application throws an exception. But stacktrace shows that problem occurs at maximebf/debugbar/src/DebugBar/DataCollector/ExceptionsCollector.php:42
, so not sure if this is related to laravel-debugbar or just debugbar.
Exactly in method addThrowable
, line $this->exceptions[] = $e;
. Hope this helps.
Delete the files in ./storage/debugbar
If using Vagrant you can edit /etc/php/7.2/cli/php.ini so that you have more memory:
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 4096M
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further.
Thank you for your contribution! Apologies for any delayed response on our side.
Same problem here with Laravel 7.16.1 and debugbar 3.3.3.
Using php 7.4.10 with FPM, and Apache 2.4.38
[Fri Sep 25 15:45:33.069651 2020] [proxy_fcgi:error] [pid 5446] [client 92.152.109.182:58170] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 27267072 bytes) in /home/project/dev/vendor/barryvdh/laravel-debugbar/src/Storage/FilesystemStorage.php on line 43', referer: https://project.local/chantiers
Hi, same problem with Laravel 10.34.2 and debugbar 3.13.5. It contains infinite loop around vendor/barryvdh/laravel-debugbar/src/LaravelDebugbar.php:268
- in my case it usually occurs when translation is missing.
[2024-06-13 09:09:41] local.WARNING: A possible infinite logging loop was detected and aborted. It appears some of your handler code is triggering logging, see the previous log record for a hint as to what may be the cause.