Laravel Octane Memory Limit
Cosnavel opened this issue · 4 comments
What happened?
Hey I use laravel octane with frankenphp. I do a large export from elasticsearch and then get a 500 with this error:
Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)
Memory in php.ini is set to:
memory_limit = 2048M
When using php fpm I don't have any issues. With swoole also no issues. For them there is a config to set the memory.
I would love to use frankenphp as it is much quicker. Is there any way to configure the memory?
Build Type
Laravel Octane default build
Operating System
GNU/Linux
CPU Architecture
ARM
This also should be mentioned in the frankenphp docs, that frankenphp does not pick up the default php.ini and needs a new one
This is actually documented: https://frankenphp.dev/docs/config/
I added more details here: https://github.com/laravel/docs/pull/9932/files#r1789864795
@dunglas thanks a lot. Think we should clarify that the simplest to change the php config is to add a php.ini to the root of the project when using octane as it then works out on mac for dev and on ubuntu for production
I agree!