• Resolved confusedneedhelp

    (@confusedneedhelp)


    Hi,

    I have a site that has grown quite a lot over the years. I noticed some archive pages were loading slower than they used to which I put down to just having more posts. However, in doing some work on a staging site I noticed that it was faster than the production site. I worked it out that having memcached enabled is actually slowing my site down.

    I am wondering if you might be able to offer any advice or things to check as to why this might be happening. It is still pretty quick either way but with memcached set to off things are loading within a second and with it on it takes maybe a second or two more.

    I was wondering if there was a limit for the memcache file and maybe it was hitting this limit and constantly refreshing itself?

    Any help is appreciated.

Viewing 2 replies - 16 through 17 (of 17 total)
  • Plugin Support Daniela Ivanova

    (@daniellaivanova)

    Hello @confusedneedhelp,

    A query result larger than 2MB can slow down a website with Memcached because large objects like a 2MB file can quickly consume a significant portion of the cache, leading to frequent evictions and reloads, especially under heavy load.

    I would like to mention that when a query result from the _options table exceeds 2MB, our plugin will automatically exclude the option in a file named .sgo-memcache-excludes to prevent it from affecting the website’s performance. However, if a query related to another table returns a result larger than 2MB, the Memcached option will be automatically deactivated by a file named object-cache-crashed.php. Additionally, if the problematic query originates from a table other than _options, the key of the oversized object will be logged in the PHP error log, provided WP_DEBUG_LOG is set to true.

    That being said, without being able to review the matter closely, we are unable to provide a specific reason or explain the behavior of the Memcached service in your case. If you are a SiteGround customer, please contact our support representatives from your Client Area so that we can review the problem at hand. If you are not a SiteGround customer, I would recommend contacting a developer to assist you with the issue.

    Best regards,
    Daniela Ivanova

    Thread Starter confusedneedhelp

    (@confusedneedhelp)

    Hi Daniela,

    I am 99% sure that this is the issue I am having. It seems that my site has grown too large for memcached to work efficiently.

    I highly recommend you to include information such as this last post (re 2MB limit) within your documentation. If I have missed it then I am sorry. I believe the best way you will avoid so many questions in the future is to give people the information to consider such as “If memcached is causing your site to be slow here are a list of things to check”.

    I think that the standard query caching in WordPress is now very good and my site has never been faster.

    Many thanks for your help and quick responses.

Viewing 2 replies - 16 through 17 (of 17 total)

The topic ‘Memcached slows down query’ is closed to new replies.