F
Filament3mo ago
Coby

Allowed memory size of 1073741824 bytes exhausted [RESOLVED]

When I try and edit a new member on my admin panel, it allows me to click the save button however as soon as I try and go to a different page on the admin pannel it gives me this error.
[2025-07-11 16:33:25] local.ERROR: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) {"userId":1,"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) at C:\\Users\\cobyl\\Herd\\penyrheolregistrationsystem\\vendor\\laravel\\framework\\src\\Illuminate\\View\\Concerns\\ManagesComponents.php:117)
[stacktrace]
#0 {main}
"}
[2025-07-11 16:33:25] local.ERROR: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) {"userId":1,"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) at C:\\Users\\cobyl\\Herd\\penyrheolregistrationsystem\\vendor\\laravel\\framework\\src\\Illuminate\\View\\Concerns\\ManagesComponents.php:117)
[stacktrace]
#0 {main}
"}
I've tried a google search but they recommend just increasing the memory size and I don't want to this.
Solution:
Updating it to v3.3.31 fixed the issue. Thanks so much for the help
Jump to solution
5 Replies
Dennis Koch
Dennis Koch3mo ago
That's 1 GB of memory which should be plenty. What are you rendering on those pages?
Coby
CobyOP3mo ago
Really not much. This is my MemberResource
return $form->schema([
Tabs::make('Swimmer Details')
->tabs([
Tabs\Tab::make('Personal Details')
->schema([
Grid::make(4)
->schema([
Forms\Components\TextInput::make('wasa_id')
->required()
->visibleOn('create')
->nullable(),
Forms\Components\TextInput::make('forename')
->required(),
Forms\Components\TextInput::make('surname')
->required(),
Forms\Components\TextInput::make('knownas')
->required()
->nullable()
->label("Known As"),

]),
return $form->schema([
Tabs::make('Swimmer Details')
->tabs([
Tabs\Tab::make('Personal Details')
->schema([
Grid::make(4)
->schema([
Forms\Components\TextInput::make('wasa_id')
->required()
->visibleOn('create')
->nullable(),
Forms\Components\TextInput::make('forename')
->required(),
Forms\Components\TextInput::make('surname')
->required(),
Forms\Components\TextInput::make('knownas')
->required()
->nullable()
->label("Known As"),

]),
Grid::make(2)
->schema([
Forms\Components\DatePicker::make('birthdate')
->required()
->label("Birthday"),
Forms\Components\TextInput::make('gender')
->required(),
]),

Grid::make(2)
->schema([
Forms\Components\DatePicker::make('joiningdate')
->required(),
Forms\Components\DatePicker::make('leavingdate'),
])
]),
Tabs\Tab::make('Squad Information')
->schema([
CheckboxList::make('groups')
->label('Squads')
->relationship('groups', 'groupname')
->columns(3),
Grid::make(2)
->schema([
Forms\Components\DatePicker::make('birthdate')
->required()
->label("Birthday"),
Forms\Components\TextInput::make('gender')
->required(),
]),

Grid::make(2)
->schema([
Forms\Components\DatePicker::make('joiningdate')
->required(),
Forms\Components\DatePicker::make('leavingdate'),
])
]),
Tabs\Tab::make('Squad Information')
->schema([
CheckboxList::make('groups')
->label('Squads')
->relationship('groups', 'groupname')
->columns(3),
Had to send two and shrink cut all the imports out to get it under the discord character limit but thats all thats being rendered I think it might be because of an infinite loop to do with my linking table thats used to make the
CheckboxList::make('groups')
CheckboxList::make('groups')
My linking table links together a member and a group. I'll send the models aswell incase they are important to debug
class Group extends Model
{
protected $table = 'groups_';

public function members()
{
return $this->belongsToMany(Member::class, 'group_members');
}
}
class Group extends Model
{
protected $table = 'groups_';

public function members()
{
return $this->belongsToMany(Member::class, 'group_members');
}
}
class Member extends Model
{
protected $fillable = ["wasa_id", "forename", "surname", "knownas", "birthdate", "gender", "joiningdate", "leavingdate"];

public function group_member()
{
return $this->hasMany(group_member::class);
}

public function groups()
{
return $this->belongsToMany(Group::class, 'group_members', 'member_id', 'group_id');
}
}
class Member extends Model
{
protected $fillable = ["wasa_id", "forename", "surname", "knownas", "birthdate", "gender", "joiningdate", "leavingdate"];

public function group_member()
{
return $this->hasMany(group_member::class);
}

public function groups()
{
return $this->belongsToMany(Group::class, 'group_members', 'member_id', 'group_id');
}
}
awcodes
awcodes3mo ago
Make sure you’re on the latest filament too. When laravel released v12.20 it created a recursion issue. But that’s been patched in latest filament version. I doubt the issue is the relationships, but I also think your belongsToMany should be HasMany
Rizal Abul Fata
Rizal Abul Fata3mo ago
excuse me sir, where the latest filament version? is it v3.3.31 for stable version? cause i've face related some problem finally after a couple days i've found the solution, cause my laravel on v12.20 and my filament on v3.3.30, thanks @awcodes
Solution
Coby
Coby3mo ago
Updating it to v3.3.31 fixed the issue. Thanks so much for the help

Did you find this page helpful?