Skip Navigation

[Resolved] Fatal Error… Failed Memory Size

This thread is resolved. Here is a description of the problem and solution.

Problem:

Add a New Post/User Form.

It is giving me an error message:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 10768 bytes) in /home/fixedpricegutter/public_html/wp-includes/wp-db.php on line 1901

My hosting provider has increased the PHP limit to 5GB, but this has not rectified the problem.

Solution:

if there are lots of data in your website, it will spend more server capability, please try to increase the PHP limitation of your website:
https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

For example:

define('WP_MEMORY_LIMIT', '512M');
define( 'WP_MAX_MEMORY_LIMIT', '1024M' );

Relevant Documentation:

https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 11 replies, has 2 voices.

Last updated by Luo Yang 6 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#606515

I am trying to:
Add a New Post/User Form.

It is giving me an error message:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 10768 bytes) in /home/fixedpricegutter/public_html/wp-includes/wp-db.php on line 1901

My hosting provider has increased the PHP limit to 5GB, but this has not rectified the problem.

Please help 🙁

#606640

Dear Martin,

I think 256M PHP memory is enough to run a small website with Toolset plugins, since you are using other plugins and a custom theme in your website, in case it is a compatibility problem, please try this:
1) deactivate other plugins and switch to wordpress default theme 2017, and test again
2) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, I need to test and debug it in my localhost, thanks

#606675
php-memory.JPG

Thanks for the details, I can import your database dump file in my localhost (PHP 7.1), within a fresh wordpress installation + the latest version of Toolset plugins, the PHP memory limitation setting is also 256M, it works fine, see screenshot php-memory.JPG.

so it should be a compatibility problem or server problem, and I checked the debug information you provided, your web server is using PHP 5.4.45, but according to WordPress document:
https://wordpress.org/about/requirements/
To run WordPress we recommend your host supports:
PHP version 7.2 or greater
https://toolset.com/toolset-requirements/
Your best option is to email your hosting company and ask them to upgrade you to PHP version 5.6 or later.

I suggest you
1) upgrade it to PHP 5.6 or above
2) deactivate other plugins and switch to wordpress default theme 2017, and test again

#607462

Hi Again, thank you for your assistance so far...

My hosting provider has upgraded the PHP to 5.6.33. Unfortunately this has not helped.

The Cred plugin seems to work fine when I deactivate all plugins other than the Avada theme base plugins (Fusion Core + Fusion Builder)

As soon as I reactivate any other plugin, i.e. Woocommerce, Yoast SEO, or Revolution slider, the Fatal memory error occurs...

Please help.

#607475

As you mentioned above:
As soon as I reactivate any other plugin, i.e. Woocommerce, Yoast SEO, or Revolution slider, the Fatal memory error occurs...
It should be a server problem, according to the Debug information you provided
https://toolset.com/forums/topic/fatal-error-failed-memory-size/#issue_tracker_section
MemoryLimit 256M

It is different from what you said:
My hosting provider has increased the PHP limit to 5GB

if there are lots of data in your website, it will spend more server capability, please try to increase the PHP limitation of your website:
https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

#608616

Hello again.

So CRED works fine when I have Avada Theme + Fusion Bulider + Fusion Core. If I then activate the Woocommerce plugin, I get the Fatal Error...
Seems like something in Toolset topping out all the memory because the number of bytes it is trying to allocate keeps changing.
Memory has been increase as much as I can, please can you look at other potential fixes?

#608769

As I mentioned above, it should be a server problem:
https://toolset.com/forums/topic/fatal-error-failed-memory-size/#post-607475

There isn't similar problem in my localhost with your database dump files

If you still need assistance for it, please provide a test site with the same problem, fill below private detail box with login details and FTP access, I can try to locate the problem for you

#609876

Hi Mr Yang,

Please could you open the private message so I can send you login details.

Thankyou

#609947

Apologies, I didnt realise I could update them in the private message I've already sent.

#610034

Thanks for the details, I have done below modification in your website, edit the file wp-config.php, change this line from:

define('WP_MEMORY_LIMIT', '256M');

To:

define('WP_MEMORY_LIMIT', '512M');
define( 'WP_MAX_MEMORY_LIMIT', '1024M' );

Please test again, check if it is fixed, more help:
https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

Administration tasks require much memory than usual operation. When in the administration area, the memory can be increased or decreased from the WP_MEMORY_LIMIT by defining WP_MAX_MEMORY_LIMIT.

define( 'WP_MAX_MEMORY_LIMIT', '256M' );

#610073

Fixed.. Thank you very much, your awesome!

#610093

You are welcome