mysql - Woocommerce: Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /wp-includes/wp-db.php on line 2720

I am getting this error when trying to do simple tasks - like updating one product'gallery in Wooocommerce. I have increased memory limits in wp-config.php:

define( 'WP_MEMORY_LIMIT', '1024M' );
define( 'WP_MAX_MEMORY_LIMIT', '1024M' );
@ini_set( 'upload_max_size' , '1024M' );
@ini_set( 'post_max_size', '1024M');
@ini_set( 'memory_limit', '1024M' );

The host doesn't allow higher number than that, which is completely reasonable to me.

I also checked the database, It had a lot of woocommerce sessions and old logs there, and I got it from 1.7GB to 0.9GB.

The issue still remains. Any ideas what else I could do? Is something occupying memory? Because 1024MB seems more than plenty for a normal Woocommerce site.

Answer

Solution:

You might be running out of disk space available on your server. Via file manager or ftp, check if your trash folder needs to be emptied. If that doesnt work, try contacting your hosting company to see if they are able to help pin point what is triggering the issue.

Source