Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 159744 bytes) in /Users/myusername/Local Sites/mysitename/app/public/wp-includes/class-wpdb.php on line 2322
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
I did a few things without knowing what I was doing…
I changed the site domain, I clicked Trust next to SSL, and I updated the PHP version. The page with the error opens but now it won’t save changes and the fonts are all different now.
System Details
Local Version: Version 9.2.6+6872
Operating System (OS) and OS version: Sequoia 15.7 (24G210)
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.
Are you able to start with a fresh site or restore from a backup? This combined with increasing the memory limit as above might be faster than troubleshooting your save and font issues.
I tried increasing memory, no change. When I hit ‘publish’ in Elementor, I still get a 500 Server Error popup.
Interestingly, when I click “view page” in Elementor, I can see the page in question with all the saved edits up to a minute or two before the error–hoping I can somehow dig up that file from the site folder.
I haven’t backed up in a couple weeks (and I corrected that mistake). Is there a way to only revert to the old version of a single page and keep the rest of the site current?
Turns out the logs I sent weren’t the most recent. I thought Local was working from the folder in my Google Drive, but at some unknown point it moved back over to my Mac’s hard drive. Attached is the latest log. Does this give any further insight on how to correct the problem? Maybe just change back the PHP version? Or maybe a filepath got messed up when I changed the domain name and/or clicked Trust the SSL?
Thanks for your updated error logs, @Spacemonkey5. They don’t point to any issues with Local. This could be a plugin issue.
When I hit ‘publish’ in Elementor, I still get a 500 Server Error popup.
Have you enabled WP_DEBUG and checked for PHP errors? That might point to the cause of the 500 error and help you see if it’s Elementor or some other cause.
I increased memory from 256M to 300M the first time, which didn’t help. Then I increased to 512M. That solved the problem…temporarily, then it came back.
I enabled the log as you suggested and gave it to Gemini Coding Partner. It said my site was creating a new revision every time I saved or autosaved a page in Elementor. The revisions piled up and bloated my database, causing performance issues and memory exhaustion errors.
It had me add “define( ‘WP_POST_REVISIONS’, 5 );” to the wp-config.php file. Then I installed WP-Optimizer and ran the “Clean all post revisions” optimization under the Database tab. After that, I was able to save changes again with no errors after those fixes. Fingers crossed, that was the root cause.