Please increase your php memory limit

What issue or error are you experiencing?

Im trying to import a spreadsheet and it keeps saying increase your php mempry limit. I have done this and increased to 256M? what else can i do? im at a loss?


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


System Details

  • Local Version:

  • Operating System (OS) and OS version:


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @jupinder! We have some detailed steps on our performance guide (at the bottom) for adjusting PHP resource limits. Once you edit the value and save it, you’ll want to make sure to Stop and reStart your Local site so that the changes can compile.

There are no slowness issues when im uploading excel sheets it is coming up with error to say that increase your php memory limit. however i have done this already and increased to the max but its still not working, and preventing me from up loading excel sheets

Understood @jupinder I was just trying to direct you to this section:

Adjusting PHP settings like memory_limit, max_execution_time and max_input_vars may improve performance. These values can be edited in the php.ini.hbs file within the site’s conf/php/ folder. After making any adjustments, be sure to stop the site and re-start it so that Local can compile and use those new settings.

Are you adjusting the memory in your php.ini.hbs file? If not can you give that a try and then be sure to Stop and Restart your site after?

I have updated the php file but its still not working?

Could you send a screenshot of what you updated?

And you Stopped and Restarted the site after saving the file change?

This is so frustrating. I’ve edited the php.ini.hbs file in order to increase my memory_limti to 512M. I’ve tried editing the compiled file in the Library/…/run folder. I even tried to force a recompile of that directory by removing it. No matter what, I get get 256M. Ahhh! This so much fun when you’re trying hit deadline. R$#WR#RQ!!! Please advise.
\

I did restart the site as well as the app.

I just tested this on my end. To verify, I clicked on Site Folder and then navigated to Conf > PHP > and then opened my php.ini.hbs file in Sublime Text editor, updated my memory limit to 512mb, and saved. Then I stopped and started my Local site again and logged in to check if the memory limit was updated in the Site Health section.

Does all of that line up with what you tried @wendybreaksout?

Thank you. That follows what I did. I used a different editor and checked to see if the configuration was recognized via the phpinfo() output generated by the “Details” link next to the PHP Version in the site Overview tab. The loaded configution file is listed as:

/Users/wendyemerson/Library/Application Support/Local/run/JayW-ngAK/conf/php/php.ini

I tried editing that directly. Evidentally, the file is rewritten when restarting the site. My change is set back to 256M. (Dog chasing tail emoji goes here).

Can you share your OS, Local version and logs here @wendybreaksout? We can take a look and see if anything is amiss.

Out of curiosity have you tried this on multiple sites? If you spin up a new, blank site in Local does the behavior persist if you try to upgrade the memory there?

I tried another site and it worked. When I went back and checked the one I’m having trouble with by going to the command line to see things without all the clutter, I saw the php directory. I was modifying the config file in the php-8.2.27 which I thought was the active configuration. Anyway, sorry. Problem solved. :woman_facepalming: Thank you for your help.

No problem @wendybreaksout! I’m glad you were able to get it sorted. Happy Developing :green_heart: