postGIS memory issue
hello filament team, im having some issue with the memory on filament relation manager, how can i modify the query in the table of relation manager, even tho i only select the only the fields i need but the boundary is still fetching (postGIS)


5 Replies
[2025-07-20 12:58:50] local.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) {"userId":"c0d51773-b643-4d13-bf73-f09d2a750a79","exception":"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0): Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) at /var/www/html/vendor/clickbar/laravel-magellan/src/IO/Parser/WKB/Scanner.php:85)
[stacktrace]
#0 {main}
"}
this is my logs
Hi. You’re running out of PHP memory (128 MB). I think you have to increase PHP memory limit in your php.ini.
Or maybe you can only select the fields you need but on the
getEloquentQuery
method of your Province Resource (don’t forget to include id or any foreign keys you need) :
public static function getEloquentQuery(): Builder
intead of ->modifyQueryUsing
because it gives you a higher-level and cleaner way to customize the base query for the resourceyeah, but this is relation manager for RegionResource, even tho i use the getEloquentQuery on the ProvincesRelationManager, its still have memory issue
correct me if im wrong. what i know is, the relation manager is doesnt have getEloquentQuery function
Ok I understand. First can you try to remove the ->with(…) and the selected attributs of Region because you can access to the parent record of the relation with a callback https://filamentphp.com/docs/3.x/panels/resources/relation-managers#accessing-the-relationships-owner-record
And try to set php memory limit to 256Mo
Can you share the associated sql query ?