phplaravelmemorylaravel-filamentfilamentphp

Laravel Filament Admin Panel: "Allowed memory size exhausted" error


I'm working on a Laravel project using Filament for the admin dashboard. Initially, everything worked fine with a few resources. But after adding a fourth resource, the panel started throwing memory errors whenever I tried to interact with it like add, edit, or delete a record. The error in the Laravel log:

PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 131072 bytes) in C:\Users\nsoor\Desktop\MyProjects\TechWin\Tamimha\storage\framework\views\1fa03be96359ae175e0340ec0983810c.php on line 393

What I’ve Tried:

My Environment:


Solution

  • You're likely on Filament v3.3.30, which had a bug causing recursive Blade rendering. That can blow up memory (even crash the app) when rendering forms or relation managers.

    Update to ^3.3.33

    composer update filament/filament
    

    Then clear the view

    php artisan view:clear
    

    The bug caused stuff like x-filament-panels::form.actions or recursive components to go into an infinite loop and fill up memory — especially after adding new resources or opening edit/create pages.