Keep getting error message on "Save" Still Need Help!

Hi, this is the message I get when I save:

An error occurred while saving your page. Various problems can cause a save to fail such as a lack of server resources, firewall blockages, plugin conflicts or server misconfiguration…contacting your host and asking them to increase the following PHP variables may help: memory_limit, max_execution_time, upload_max_input_vars

I have disabled all plugins and have only my Divi Theme builder running.

Does anyone have advice on how to fix this? I’m not sure if this is a problem with Local, my PHP memory or with my Divi Theme builder?

These are the two screens that come up when I try to turn on my Divi Theme Builder.

Front end-Edit Page

Back end-Edit Page

Hey @Bizolly

From the messages in the stack trace, it looks like Divi is trying to load too many things into memory. By default, Local has 256Mb allocated to PHP which should be enough for most purposes.

Does this page have some sort of dynamically created content, like a list of posts, products or other WordPress “things”? If that query is set to something like “Get all the posts”, you might consider reducing that to a smaller amount, like 20 and make use of pagination.

Let us know a little more about what kind of content is being used on the site and if changing the query for that content helps.

1 Like

Hi Ben, thank you for getting to me. I have 4 sections of dynamic content which is all CSS driven. No extra plugins required.

This is a flip card CSS which is 2 images. When you hover over logo, it flips over to show another image.

This is a hover option to reveal text. (when you hover over letter a line of text is revealed)

This is a simple slider of one image w/text and 6 slides. Each slide is the same.

This is a 4 toggles of text points.

I’m not pulling content from another page, like posts or video, etc. I have used background images, section dividers but they are options available in Divi’s builder not extra CSS. I have two other sections on the page but they are simply images and text. It seems very simple to me but maybe I’m wrong? Is there a way to increase the 256mb allocated to PHP?

The other concern I have is what happens when I move on to creating the next page? Does this also impact things because this fatal error message shows up when I start up the site. Then when I close the error page, reopen it, it seems to go away until I make some changes (correct text) and try to resave the page. I typically have to save the text change 3-4 times before it succeeds.

This is home page and I have 10 other text pages (privacy policy, etc.). And, what happens when I activate any other plugins? Does this also impact things?

I have installed a plugin called HealthCheck and here is the messages/issues it finds:

|WordPress Version|5.1.1|
| --- | --- |
|Plugin Versions|* Your site has 2 active plugins, and they are all up to date.

* Your site has 5 inactive plugins, it is recommended to remove any unused plugins to enhance your site security.|

|Theme Versions|* Your site has 2 installed themes, and they are all up to date.|

|PHP Version|7.2.0|

|Database Server version|5.5.60-0+deb8u1
**** For performance and security reasons, we strongly recommend running MySQL version 5.6 or higher.|

|PHP Extensions|
**** The optional module, libsodium, is not installer, or has been disabled.

**** The required module, mcrypt, is not installer, or has been disabled.|

|MySQL utf8mb4 support|Your MySQL version supports utf8mb4|

|HTTPS status|You are not using HTTPS to access this website.|

|Secure communication|Your WordPress install can communicate securely with other services.|

|Scheduled events|No scheduled events have been missed.|

|Plugin and Theme Updates|* Plugin updates should be working as expected.

* Theme updates should be working as expected.|

|HTTP Requests|HTTP requests should be working as expected.|

|REST API availability|The REST API is available.|

|Communication with WordPress.org|WordPress.org is reachable from your server.|

|Background updates|* No version control systems were detected.

* Your installation of WordPress doesn't require FTP credentials to perform updates.

* All of your WordPress files are writable.|

|Loopback request|The loopback request to your site completed successfully.|

That kind of content doesn’t seem like it would be an issue, but that does look like it’s fairly image heavy. I would think that maybe there’s something else causing that. If you want to get really “dev-y” you can install the Query Monitor plugin: Query Monitor – WordPress plugin | WordPress.org

which would allow you to get detailed information about what kinds queries are being run in order to generate a page. That might point you to the specific things that are eating up all of that memory.

You can also increase the memory by cloning the site to a custom environment and editing the php.ini configuration file.

That file is located in site-folder/conf/php/<php-version>/php.ini

The only drawback of this is that with a custom environment, you can’t use Local Connect to push or pull the site, but at least you will be able to work with increased memory and hopefully avoid that error.

To your other questions about this affecting other pages, I think increasing the memory in php.ini should fix the issue, but if it doesn’t you might need to track down the source of that memory usage using the Query Monitor plugin

1 Like

Hi again Ben,

I installed the plugin and am getting some info I don’t quite understand. Maybe you could tell me if something is wrong:

Overview

Page Generation Time

1.0903
0.1% of 900s limit

Peak Memory Usage

8,895 kB
3.4% of 262,144 kB limit

Database Query Time

0.0152

Database Queries

SELECT: 46
INSERT: 4
SHOW: 2
UPDATE: 4
Total: 56

Object Cache

96.0% hit rate (1,623 hits, 67 misses)

**** ! External object cache not in use

**** ! The Redis extension for PHP is installed but is not in use by WordPress

Opcode cache in use: Zend OPcache

I’m not clear what I’m looking for using the plugin. Sorry, I’m only a beginner to intermediate wp user.

And, my local environment is already set on Custom. I’ll try setting the new memory usage.

Yes, this page does seem to have pretty heavy image usage. Just feel concerned about continue building.

When you mention I cannot push/pull site…does this mean I would need to change Custom status before I go live? Does building in Custom have any negative effects on finished product that I should be aware of?

Also, in changing the php.ini located in php/7.2.0 folder, I noticed there are two other folders with php.ini files? Is this correct? And, do I have to change the memory in each php.ini file? AND, 2 nginx files? Something doesn’t seem correct here…?!

Again, thanks for you help. Carol

Hey @Bizolly

That info from Query Monitor looks pretty good, however, what page are you looking at when reading this info – the numbers will change depending on what page is visited. You can read these numbers like this:

How long the server took to generate the page. That’s a little bit over 1 second, which could be better, but isn’t too bad.

This is the amount of RAM that was used by WordPress to create the page. 8,895Kb is kilobytes, so just under 9Mb needed. This is pretty good. I’ve seen much worse! :smiley:

That all seems good. If you’re curious about the various queries that WP makes, this is a good place to dig in. Having too many queries, or queries that take too long can be the source of slow page loads, but that doesn’t look like the case here.

Books can be written about this…That ratio looks pretty good. This is PHP’s object cache, so the instantiated objects that are reused on a page load.

That’s correct, in order to push or pull the site to Flywheel’s servers, you’ll need to clone the site to a preferred environment. There aren’t any real issues creating a site in the custom environment, but if the site only works in the custom environment, it may be an indication that it will need more resources than what is default on Flywheel’s servers.

I would say, since this appears to be happening only when saving the page, you might try cloning to a preferred environment and pushing to a demo site to see if things behave better on the server.

I think that you only need to change it within the 7.2.0 folder. Double check by looking at what version of PHP is being used on the site within Local:

As far as having the nginx folder – that may be from an old setup of this custom site. Either way, the configuration that is being used, will be whatever is set within Local:

Overall, since the original error was occurring during saving, I’m wondering if there are additional jobs that are being run that use up all of the available memory. This could be things like resizing or compressing images or doing some sort of additional background work.

Hopefully increasing the memory within the php.ini will allow you to save the page. Keep in mind though that if you have to increase this value significantly, there might need to be adjustments made to the server’s memory limits when deployed to Flywheel, or any other server.

Hope that helps clarify things. Let me know if you need anything else!

1 Like

Hi Ben, I’ve been hoping to hear from you. Thanks for getting to me. I appreciate all the insight. I have a question concerning the items in my local folder: should I delete one of the nginx folders? And since I’m using only one php folder do I delete the others?

The fatal error seems to have decreased significantly since increasing the memory to amount you suggested. When saving, very few error messages now.

I’m glad the site’s been more stable with those changes @Bizolly!

I would just leave them folders there. They aren’t hurting anything, and they don’t take up too much space.

1 Like

Hi Ben, Thank you for all your help. Your input has been invaluable and for me, educational. Wish you much success. Carol

1 Like