• Resolved _Jo

    (@_jo)


    Hi Ajay,

    first of all, thank you for this plugin!
    It works really well and I only have a problem with a very specific post. Might be interesting for you, so I’ll describe it as good as I can.

    At the plugin settings I enabled the “Related posts based on title and content” option.

    There’s a post that keeps throwing this error in the logs:

    `WordPress database error FTS query exceeds result cache limit for query SELECT DISTINCT posts.ID, posts.post_date FROM posts INNER JOIN term_relationships AS crpt_tr ON (posts.ID = crpt_tr.object_id) INNER JOIN term_taxonomy AS crpt_tt ON (crpt_tr.term_taxonomy_id = crpt_tt.term_taxonomy_id) WHERE 1=1 AND MATCH (post_title,post_content) AGAINST (‘____LONG TEXT REDACTED_____’) AND posts.post_date < ‘2020-05-21 08:23:39’ AND posts.post_date >= ‘2018-01-22 08:23:39’ AND posts.post_status IN (‘publish’,’inherit’) AND posts.ID != 343557 AND posts.post_type IN (‘post’) AND crpt_tt.term_id IN (6) LIMIT 0, 4 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/CUSTOM_THEME_NAME_REMOVED/single.php’), echo_crp, get_crp, get_crp_posts_id, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC\_CallUnderlying->query, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_WpdbNew->default_query

    The blog is NSFW, as is the long text. I’m happy to provide a link or a text file in private. That specific text has a lot of quotation marks that are all correctly masked as far as I can see that in the log file.

    Not sure what to make of this, for now I’ll probably just shorten the text as it then works again.

    Again, thought it might be interesting for you. We do have a dedicated DB server, so allocating more RAM or something might do the trick.

    My best,
    Jo

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ajay

    (@ajay)

    I don’t know if this is something that could work by tweaking your mySQL settings: https://stackoverflow.com/questions/46172668/error-188-hy000-fts-query-exceeds-result-cache-limit-mysql

    Another option is to reduce the amount of text to be compared using the setting Limit content to be compared

    https://ps.w.org/contextual-related-posts/assets/screenshot-2.png?rev=2107023

    Thread Starter _Jo

    (@_jo)

    Thanks for your reply!

    MySQL is 5.7.30 but the cache is the default of

    innodb ft result cache limit 2,​000,​000,​000

    So I’ll keep that in mind if it happens again, thank you!

    I completely missed that word limit, duh! I’ll have to experiment with that.

    What I did try though was to completely remove every quotation mark from the text. That worked wonders and the error didn’t show up.

    Original:
    320 words | 1,714 characters | 38 times ” (quotation mark)
    load time preview 38s | DB error and no related posts

    Without quotation marks:
    load time 13s | no DB error and related posts

    Not sure if is only a problem with the ” or if it affects DB requests with all masked entities.

    Thanks again & I hope this was a little bit helpful for you as well!
    Jo

    Plugin Author Ajay

    (@ajay)

    @_jo

    Thanks for the update. This is interesting to learn and could definitely help others who have this issue.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘DB cache limit’ is closed to new replies.