Killed Query errors in log

Forums › Forums › Search & Filter Pro › Killed Query errors in log

Tagged: 

Viewing 4 posts – 1 through 4 (of 4 total)
  • Anonymous
    #64822

    I have Search and Filter running on a site with about 1100 custom posts. Using several different Search/Filter pages that are querying taxonomies. I host with WpEngine, and I’m getting these errors in the log file:

    Tue Oct 18 12:56:56.679342 2016] [:error] [pid 16736] [client 64.83.196.42:15298] KILLED QUERY (45767 characters long generated in /nas/content/live/rfpviss/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-cache.php:1887): SELECT wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND wp_posts.ID IN (8178,8179,8180,8181,8182,8183,8184,8185,8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197,8213,8214,8215,8216,8217,8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229,8230,8231,8232,8233,8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250,8251,8252,8253,8254,8255,8256,8257,8258,8259,8260,8261,8262,8263,8264,8265,8266,8267,8268,8269,8270,8271,8272,8273,8274,8275,8276,8277,82….. (many many more IDs here)

    According to WpEngine, that error is generated whenever the query string exceeds 16000 characters. Any advice on how to optimize this?

    Ross Moderator
    #64826

    Hey Howard

    This is preventative measure with WP Engine, but lots of search plugins must create long queries like this because we pass all the post IDs from our searches to a WP_Query..

    To get around this add this to your wp-config:

    define('WPE_GOVERNOR', false);

    I first discovered this from here – https://searchwp.com/docs/kb/attention-wp-engine-customers-no-results-long-query-killed-query-notices/

    Thanks

    Anonymous
    #64835

    Thanks Ross, good info, I’ll give that a try.

    Anonymous
    #177700

    Any update if this solution worked?

Viewing 4 posts – 1 through 4 (of 4 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.