Allowed memory size of 268435456 bytes exhausted (tried to allocate 16777248 bytes) #4010
Unanswered
jeromevillaver
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You are loading your entire Player::all() data in memory, that is probably too much for PHP to handle within 2GB. Use FromQuery instead and it should already improve a bit. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I got this error
Allowed memory size of 268435456 bytes exhausted (tried to allocate 16777248 bytes)
even if I add PHP_MEMORY_LIMIT=2G this in .env
controller
Beta Was this translation helpful? Give feedback.
All reactions