admin管理员组

文章数量:1125493

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.

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.

Share Improve this question edited Oct 22, 2021 at 16:22 Tom J Nowell 60.7k7 gold badges77 silver badges147 bronze badges asked Oct 22, 2021 at 16:01 TAL9000TAL9000 211 bronze badge 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
Add a comment  | 

1 Answer 1

Reset to default 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

本文标签: performanceMultisite with 220 sites painfully slow