• Hi experts,

    I experience a memory problem on a large website.

    PHP Fatal error:? Allowed memory size of 536870912 bytes exhausted (tried to allocate 4194312 bytes) in /wp-includes/class-wp-list-util.php on line 168

    WP 6.4.2 / PHP 8.2.14

    Any Idea where it comes from and how to solve it?

    Thanks & best regards,
    Alex

Viewing 6 replies - 1 through 6 (of 6 total)
  • The error you’re encountering indicates that your WordPress site is exceeding the allocated memory limit. This is a common issue in larger websites or websites with many plugins. Here’s a step-by-step guide to troubleshoot and solve this issue:

    1. Increase PHP Memory Limit:
      • Edit the wp-config.php file in your WordPress root directory.
      • Add the line define('WP_MEMORY_LIMIT', '1024M'); before /* That's all, stop editing! Happy blogging. */.
      • This increases the memory limit to 1024M. Adjust the value based on your needs and server capacity.
    2. Plugin and Theme Check:
      • Deactivate all plugins and switch to a default theme like Twenty Twenty-One.
      • If the issue resolves, reactivate each plugin one by one and switch back to your original theme, checking each time if the error reoccurs to identify the culprit.
    3. Optimize Your Website:
      • Large websites can benefit from optimization. Consider implementing caching, optimizing images, and database cleanup.
    4. Server Resources:
      • If your website has outgrown its current hosting plan, consider upgrading to a plan with more resources.
    5. Check for Code Issues:
      • Since the error points to class-wp-list-util.php, there might be a specific function causing the issue. If you have custom code or specific plugins interacting with lists, check those.
    6. Consult Your Hosting Provider:
      • If you’re unsure or the issue persists, contact your hosting provider. They can provide insights specific to your server environment.
    7. PHP Version:
      • Ensure your PHP version is compatible with your WordPress version. PHP 8.2 is quite new, and some plugins/themes might not be fully compatible yet.
    Moderator James Huff

    (@macmanx)

    If you’re seeing this error either suddenly (no specific task was done to cause the error) or frequently, try deactivating all plugins to rule out a plugin-specific issue and try switching themes to rule out a theme-specific problem.

    Otherwise, here are three ways to increase PHP’s memory allocation:

    1. If you can edit or override the system php.ini file, increase the memory limit. For example, memory_limit = 512M
    2. If you cannot edit or override the system php.ini file, add php_value memory_limit 512M to your .htaccess file.
    3. If neither works, it’s time to temporarily ask your hosting provider to increase PHP’s memory allocation on your account. Keep in mind that most decent hosting providers temporarily allow users to increase the memory allocation. If your hosting provider won’t accommodate you, perhaps it’s time to find a new one. We have some recommendations at https://www.ads-software.com/hosting/

    (in the above examples, the limit is set to 512MB)

    Thread Starter wurzelsepp1

    (@alexprepo)

    Thanks for your information.

    As mentioned before, it’s a really large website (> 5 mio. products in post table). as the problem with the mem allocation daily happens, when a cron job calls wp_cron, we are not sure, if we assigned enough memory.

    Is there a mem limit, WP can use?

    • This reply was modified 10 months, 1 week ago by wurzelsepp1.
    Moderator James Huff

    (@macmanx)

    Please try the steps in either of our replies to increase the memory allotment.

    Thread Starter wurzelsepp1

    (@alexprepo)

    This is the reason, why I’m asking. I already tried 1G and would add some if I knew how much can be used ..

    Moderator James Huff

    (@macmanx)

    1 GB should be more than enough. Does the problem continue if WooCommerce is the only active plugin? If not, reactivate them one-by-one until you find the cause.

    There are a lot of big sites running WooCommerce: https://woo.com/showcase/ So, if the problem continues with WooCommerce as the only plugin, I recommend getting in touch with WooCommerce’s support for advice about this via https://woo.com/my-account/contact-support/ if you have any of their paid WooCommerce products or https://www.ads-software.com/support/plugin/woocommerce/ if you do not.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Listutil – Memory problem’ is closed to new replies.