Support » Plugin: WooCommerce » Woo Backend product search not working

  • Resolved mo7900

    (@mo7900)


    Hi there, hope someone can help out here.

    search in product admin page is not loading anything and giving a 524 error after a while. We de-activated all plugins and tested, no luck. Paused cloudflare with all plugins de-activated no luck, everything mentioned before plus switching the theme to 20/24, no luck.

    Order search and everything-else works fine. There are more than 4000 plus products, is that why?

    Our settings our below;

    php_value max_execution_time 300
    php_value max_input_time 300
    php_value max_input_vars 3000
    php_value memory_limit 1000M
    php_value post_max_size 128M

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support mother.of.code

    (@imazed)

    The Mother of Code | Automattic Happiness Engineer

    Hi there! This is indeed likely related to the number of products you have, combined with the server’s resources. In particular, if the products are variable and have a lot of variables connected, that will put a large load on your server’s capacities.

    I recommend having a chat with your hosting provider to see if the resources can be upped, or that a switch to a different type of service is a good idea for you.

    Hope that helps. Have a wonderful day ahead!

    mo7900

    (@mo7900)

    Hi @imazed

    Thanks for your prompt reply. We contacted the host and even increased our resources heavily (we’re hosted in a private VPS), but the issue still persist, and they informed us to work with MySQL developer to analyze our DB, since the server we have is quite good to handle this load. With the MySQL dev, we found this issue, which is causing the time-out.

    SELECT SQL_CALC_FOUND_ROWS
    wp_posts.ID, wp_posts.post_title
    FROM
    wp_posts
    LEFT JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id
    WHERE
    1 = 1 AND wp_posts.post_type = ‘product’
    AND (wp_posts.post_status = ‘publish’
    OR wp_posts.post_status = ‘future’
    OR wp_posts.post_status = ‘draft’
    OR wp_posts.post_status = ‘pending’
    OR wp_posts.post_status = ‘private’)
    AND (
    ( ( wp_posts.post_title LIKE ‘%iphone%’)
    OR ( wp_posts.post_excerpt LIKE ‘%iphone%’)
    OR ( wp_posts.post_content LIKE ‘%iphone%’ )
    OR ( wp_postmeta.meta_key = ‘_sku’ AND wp_postmeta.meta_value LIKE ‘%iphone%’) )
    )
    ORDER BY wp_posts.post_title ASC
    LIMIT 0 , 20

    Of which, this part is really heavy: OR ( wp_postmeta.meta_key = ‘_sku’ AND wp_postmeta.meta_value LIKE ‘%iphone%’) )

    I’m wondering if you can recommend us what we have to do to optimize this, as it’s quite heavy for even a regular MySQL optimizer to optimize at the moment. I’m sure there are websites with 20k, 50k plus products that are running on Woo.

    Thank you!

    this issue is caused due to WordPress. Cannot believe WP is yet to fix this as this has been reported 3 years ago (https://core.trac.wordpress.org/ticket/33885#comment:79) and dissapointed as well that WC hasn’t made an effort to push this with WP, as stores grow bigger, these are issues that needs to automatically be addressed between it’s partners, as we need WP to use WC.

    Anyone who wants a fix for this follow the guide here: https://9seeds.com/wordpress-admin-post-editor-performance/

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Woo Backend product search not working’ is closed to new replies.