2

We’re having issues with the site being painfully slow. It can take anywhere from 6 second to 20 seconds to login.

The odd thing is that this only seems to happen with the Super User account that has access to all 220+ sites, but Super User accounts that only are on a couple sites don’t take as long.

Any ideas as to why or what’s being loaded in the background? I’m assuming there’s some sort of login hook for that is loading options or preferences that has to do with every site that Super User is attached to.

I’m thinking maybe if I can disable pre_get_blogs_of_user & update_meta_cache or something.

The database query that returns from update_meta_cache is 950+ records long and appears to be a user settings for every site it’s a member of. Considering it’s the Super User account, it loads them all.

3
  • that's a lot of sites, I hope you're not hosting this on a shared host. Otherwise, it could literally be any one of thousands of things. You need to be much much more specific than slow. Which part of the load process is slow? Slow queries? Lots of queries? Is it making HTTP requests? How slow are the slow things specifically? Remember this isn't a discussion forum, you have to ask a specific question then mark an answer as the factually correct answer for all people with that question. If that's not possible then you need to change your question
    – Tom J Nowell
    Commented Oct 22, 2021 at 16:13
  • Install Query Monitor, and watch out for large options that are deserialized. In that case it's not the query that takes so long, but the deserialization.
    – fuxia
    Commented Oct 22, 2021 at 16:47
  • We're on AWS & already have Query Monitor installed. That's how I know about the update_meta_cache query that returns 950+ records (that loads options/profiles for all the multisite sites the Super User is a member of.) I mentioned already that it takes 6 to 20 seconds just to log in. A few more than that when clicking on other admin pages. The question is, how do I disable pre_get_blogs_of_user or update_meta_cache?
    – TAL9000
    Commented Oct 23, 2021 at 2:04

1 Answer 1

0

I came across a similar post here, it looks like you can use this filter to prevent making those update_meta_cache calls:

https://wordpress.stackexchange.com/a/395481

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Feb 13 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.