Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel Octane Memory Limit #1066

Closed
Cosnavel opened this issue Oct 6, 2024 · 4 comments
Closed

Laravel Octane Memory Limit #1066

Cosnavel opened this issue Oct 6, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Cosnavel
Copy link

Cosnavel commented Oct 6, 2024

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

@Cosnavel Cosnavel added the bug Something isn't working label Oct 6, 2024
@Cosnavel
Copy link
Author

Cosnavel commented Oct 7, 2024

laravel/docs#9932 (comment)

This also should be mentioned in the frankenphp docs, that frankenphp does not pick up the default php.ini and needs a new one

@dunglas
Copy link
Owner

dunglas commented Oct 7, 2024

This is actually documented: https://frankenphp.dev/docs/config/

I added more details here: https://github.com/laravel/docs/pull/9932/files#r1789864795

@Cosnavel Cosnavel closed this as completed Oct 8, 2024
@Cosnavel
Copy link
Author

Cosnavel commented Oct 8, 2024

@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

@dunglas
Copy link
Owner

dunglas commented Oct 8, 2024

I agree!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants