Fatal error: Allowed memory size (Only on WooCommerce Product Category Pages)

[ad_1]

Hey all,

My site has recently developed a strange issue where it is giving a fata error regarding

Fatal error:

**Fatal error**: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in **/home/username/**[**https://samplesite.com/…/AccessiblePrivateMethods.php**]) on line **158**

**It is only happening on ‘Product Category’ pages.**

**The product pages themselves are working just fine, as is the rest of the website.**

I have restored an older version of the site, and increased the PHP memory limit using the recommend method on my Hosts file editor but still getting the error. The error varies when the cache is cleared but they are all pointing to WooCommerce ‘Allowed memory size ‘.

I think I know what may have caused the issue. I entered a long product description in the short product description field when adding a product.

Offending product since edited and deleted but still same error.

Has anyone any other suggestions?

Thanks

[ad_2]
4 Comments
  1. Hey there!

    That error message is definitely pointing to a memory issue with your site. It’s strange that it’s only happening on product category pages though.

    You mentioned that you restored an older version of the site and increased the PHP memory limit, but are still getting the error. Have you tried completely disabling any plugins that are related to WooCommerce to see if that resolves the issue?

    It’s also possible that the long product description you entered could still be causing issues. Maybe try creating a new product with a shorter description and see if the error persists?

    Hope that helps! Good luck.

  2. How much memory does your site have access to?

    How much memory does php have access to?

    What plugins are you using?

    What is the full path of accessibleprivatemethods.php?

    Most of the time, these sorts of errors are due to bugs in plugins, but can also be lack of memory.

  3. In short, it’s a well known issue in shared hosting that run on PHP with default configuration.

    But you should set it in cPanel that control PHP settings, not from your editor that may have no effect to change.

  4. WooCoomerce can sometimes not play nice with cheap hosting, assuming you’re on cheap hosting. You can [try the basics first]) and see if this helps but normally clients I’ve had tend to upgrade their shared hosting to a vps when stuff like this starts happening.

    Check any error logs you have as well and also enable it in the wp-config as well.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer