MyListing search form dropdown filter slow query

  • scumunna
    Participant
    # 1 year, 9 months ago

    Hi Patrice!
    I’ve been trying to get to my website cartochrome.com, but I’m my PHP has slow logs. I talked to my host and here is their reply:

    “Thanks for your kind patience. We tried to investigate with the root cause and found the issue and the Mysql sleep queries which are eating up server resources and adding delay while opening the homepage. Sharing logs and queries below:
    PHP slow logs indeicated that some of the theme functionality is changed which is invoking Mysql query continously, the php slow logs are:

    [13-Sep-2020 12:54:15] [pool zxsrhnucky] pid 17511
    script_filename = /home/327437.cloudwaysapps.com/zxsrhnucky/public_html/index.php
    [0x00007f671e414750] mysqli_query() /home/327437.cloudwaysapps.com/zxsrhnucky/public_html/wp-includes/wp-db.php:2033
    [0x00007f671e4146e0] _do_query() /home/327437.cloudwaysapps.com/zxsrhnucky/public_html/wp-includes/wp-db.php:1922
    [0x00007f671e414600] query() /home/327437.cloudwaysapps.com/zxsrhnucky/public_html/wp-includes/wp-db.php:2635
    [0x00007f671e414540] get_col() /home/327437.cloudwaysapps.com/zxsrhnucky/public_html/wp-content/themes/my-listing/includes/src/listing-types/filters/traits/postmeta-query-helpers.php:80
    [0x00007f671e414330] postmeta_get_choices() /home/327437.cloudwaysapps.com/zxsrhnucky/public_html/wp-content/themes/my-listing/templates/explore/filters/dropdown.php:38

    The mysql query which is continously running:
    | 20115 | zxsrhnucky | localhost | zxsrhnucky | Query | 137 | Sending data | SELECT wp_postmeta.meta_value
    FROM wp_posts
    INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )
    INNER JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id )
    WHERE wp_postmeta.meta_key = ‘_disease-index-name’
    AND wp_postmeta.meta_value != ”
    AND wp_posts.post_type = ‘job_listing’
    AND wp_posts.post_status = ‘publish’
    AND mt1.meta_key = ‘_case27_listing_type’
    AND mt1.meta_value = ‘location’
    GROUP BY wp_postmeta.meta_value
    ORDER BY COUNT(wp_postmeta.meta_value) DESC | 0.000 |

    Kindly share these with the developer and let us know if we can be of any further assistance from server-side.”

    This happened recently and I’m trying to see if this has anything to do with WPSOLR. This only happens on my homepage as far as I can see, which is weird. Let me know your thoughts.

    Thanks!

    Stephen

    wpsolr
    Keymaster
    # 1 year, 9 months ago

    How is defined your field “_disease-index-name” in MyListing?

    wpsolr
    Keymaster
    wpsolr
    Keymaster
    # 1 year, 9 months ago

    I attached a fix to the roadmap card.

    wpsolr
    Keymaster
    # 1 year, 9 months ago

    I attached a fix to the roadmap card.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.