• Resolved _Jo

    (@_jo)


    Hi Ajay,

    I noticed very long saving times after the last update, but wasn’t exactly sure how to counter them by adjusting the settings (I deactivated the plugin to test and it got better). Never had problems like this with the previous versions.

    Got this automated email from my WP installation today:

    Error Details
    =============
    An error of type E_ERROR was caused in line 117 of the file
    /home/______/public_html/wp-content/plugins/contextual-related-posts/includes/modules/cache.php.
    Error message: Allowed memory size of 134217728 bytes exhausted (tried
    to allocate 8388616 bytes)

    Any idea what this could be?

    Main Settings are:
    Cache HTML output – ON
    Only from same – Tags
    Number of common terms – 1
    Related posts should be newer than – 850 (~2,3 Years)
    Limit content to be compared – 100 (Words)

    Currently 106,299 posts published over a period of 16 years on that installation, dedicated server, database on (well equipped) extra server, also running W3 Total Cache.

    Thank you for your time!
    Jo

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

    (@ajay)

    This is really strange but am wondering if this is because of the sheer volume of posts.

    It is a simple array_merge so it shouldn’t be exhausting memory although I think it might be a super large array hence the issue.

    https://github.com/WebberZone/contextual-related-posts/blob/v3.0.3/includes/modules/cache.php#L117

    But, I think this could be due to this that you’re seeing long saving times.

    Few things to try:
    1. Clear the CRP Cache
    2. Disable the CRP Cache, especially since you have W3 Total Cache

    Separately, would you be in a position to test a beta version that I think I could write up to optimise the query a few lines above and could potentially improve saving times.

    Plugin Author Ajay

    (@ajay)

    I’ve uploaded a new version of the cache.php file in the repo:
    https://github.com/WebberZone/contextual-related-posts/blob/master/includes/modules/cache.php

    This will only attempt to fetch the cache of the post and then clear which should hopefully speed up the post saving issue – it will of course depend on how many other plugins tap into doing something on post save.

    Thread Starter _Jo

    (@_jo)

    Thanks!
    I’ll try the cache.php first and will report back.

    (And yes, lots of posts, probably more than your average plugin user)

    Thread Starter _Jo

    (@_jo)

    Okay, I made a backup of the file and uploaded your new cache.php file to the server.

    Saving/Updating a post has gone down from almost 2 minutes to the normal 5-6 seconds. Related posts seem to still work as well.

    Thank you very much!

    I’ll keep an eye on it for a few days more, but I’m very happy right now!

    Plugin Author Ajay

    (@ajay)

    Excellent! @_jo

    Thanks for confirming this. I’m planning to roll out 3.0.4 over the weekend with this and a few more changes.

    Do consider leaving a review if the plugin serves you well – especially given the number of posts you have!

    • This reply was modified 3 years, 10 months ago by Ajay.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Your Site is Experiencing a Technical Issue’ is closed to new replies.