WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 8 weeks ago

#16853 accepted enhancement

Error 500 when a user has too many sites

Reported by: luuzan@… Owned by: PeteMall
Milestone: Future Release Priority: normal
Severity: minor Version: 3.0.1
Component: Networks and Sites Keywords: needs-patch dev-feedback ux-feedback
Focuses: multisite, administration Cc:

Description

My installation

3.0.1 multi-site installation with more than 7500 blogs, with one user each. I also have one moderation user that can administer each of the blogs.


The issue

In the admin interface, when I go to Super-Admin -> Users, and when I display the page that contains my moderation user, I get "An error (500 Internal Server Error) has occured in response to this request". The page tries to display all the sites administered by him (around 7500 of them), hence the error.


Updating to 3.1 didn't resolve the problem.


Recommended enhancement

For each user in the list, display only a certain number of sites, with a possibility to see all of that user's sites, if needed.

Attachments (1)

create_fake_sites.php (2.0 KB) - added by csixty4 17 months ago.
WP-CLI command to create a bunch of dummy subdirectory sites and admin users (can be adapted to subdomains if needed). Set up a multisite, Network Activate the plugin, and run the command "wp generate_fake_sites generate 8000"

Download all attachments as: .zip

Change History (19)

comment:1 @ramoonus4 years ago

have you turned on debugging?
and increased php memory_limit

comment:2 @luuzan@…4 years ago

Turning on debugging didn't help.

Even if I had increased the "memory_limit" setting, I don't think it would be a good idea to display all of the 7000 and something sites on one page at once.

comment:3 @SergeyBiryukov4 years ago

  • Keywords needs-patch added

comment:4 @nacin4 years ago

  • Owner set to PeteMall
  • Status changed from new to reviewing

Yeah, we should paginate this. What's the URL that breaks? Keeping in mind the network admin changes in 3.1.

comment:5 @luuzan@…4 years ago

The admin has changed quite a bit since I have reported this issue (3.0.1). Today I have 3.2.1 running and the URL is

/wp-admin/network/users.php
/wp-admin/network/users.php?paged=x

Last edited 4 years ago by luuzan@… (previous) (diff)

comment:6 @PeteMall3 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Status changed from reviewing to accepted

comment:7 @edward mindreantre3 years ago

  • Cc edward@… added

I don't suppose y'all could include a dump of your db?

Those wanting to help probably don't want to create 5000 sites manually...

comment:8 follow-up: @luuzan@…3 years ago

Unfortunately, with over 8000 sites, we cannot afford that.

comment:9 in reply to: ↑ 8 @edward mindreantre3 years ago

Replying to luuzan@…:

Unfortunately, with over 8000 sites, we cannot afford that.

Then I'm not really sure that anyone can "afford" to help you if you're not willing to make it easier for people to find the bug and fix it.

The street goes both ways, eh?

Just do a DB dump, leave the post tables empty, just to give us lots of sites to play with and try to paginate. No harder than that and the dump won't be more than about 250kb big, I imagine.

comment:10 @dd323 years ago

Then I'm not really sure that anyone can "afford" to help you if you're not willing to make it easier for people to find the bug and fix it.

I don't think anyone reporting a bug should be expected to provide a database dump for that simple purpose.

It's not hard to create many blogs/users/posts in a loop, unless it's a bug related to a specific configuration which shouldn't ever happen, there's no need to take that tone.

comment:11 @luuzan@…3 years ago

Do you really need an 8000 site dump to be able to develop that simple a pagination ?

@csixty417 months ago

WP-CLI command to create a bunch of dummy subdirectory sites and admin users (can be adapted to subdomains if needed). Set up a multisite, Network Activate the plugin, and run the command "wp generate_fake_sites generate 8000"

comment:12 follow-up: @csixty416 months ago

  • Keywords dev-feedback added

This is an old, old ticket dating back to 3.0.x. Can we mark it resolved?

All Sites & User tables have pagination these days. It's possible to have a user setting for too many items per page that leads to a 500 error, which could be fixed by imposing some kind of upper bound on this setting. But I'm not sure that's a decision that should be forced on admins.

comment:13 in reply to: ↑ 12 @SergeyBiryukov16 months ago

Replying to csixty4:

All Sites & User tables have pagination these days. It's possible to have a user setting for too many items per page that leads to a 500 error, which could be fixed by imposing some kind of upper bound on this setting.

The ticket is not about items per page, it's about the list of sites for a particular user in a table row (Sites column):
tags/3.8/src/wp-admin/includes/class-wp-ms-users-list-table.php#L234

Looks like "My Sites" screen doesn't have an upper limit or pagination either:
tags/3.8/src/wp-admin/my-sites.php#L20

Last edited 16 months ago by SergeyBiryukov (previous) (diff)

comment:14 @jeremyfelt16 months ago

  • Component changed from Administration to Network Admin

comment:15 @nacin14 months ago

  • Component changed from Network Admin to Networks and Sites
  • Focuses administration added

comment:16 @jeremyfelt8 weeks ago

  • Keywords ux-feedback added

Beyond the possible server errors, the usability on this is pretty crazy. I'm sure it's an edge case, but even being a member of ~10-20 sites gets pretty ugly.

https://cldup.com/j_sqN7SvoI-1200x1200.png

One option is to turn off the "Sites" column in screen options. This would get rid of the 500 error. Unfortunately, this is the only view where you can see all the sites a user is a member of.

I'm not imagining a great interface for pagination inside a list table column yet, but it may be possible. Is it worth adding a new interface for "user's sites"?

comment:17 @luuzan@…8 weeks ago

When I first reported this 4 years ago, it was simply because of the 500 errors. And it's true that I don't have a specific need to see all the sites that the user can administer.

But then again, if we have "site's users", why wouldn't we have "user's sites", just for the sake of consistency ?

comment:18 @helen8 weeks ago

There's a My Sites view, maybe that's usable for different users in the network. I don't think that screen scales either, though.

I would probably list the primary blog and then indicate X more. Maybe that links somewhere else, maybe that loads X more sites and you can keep clicking to load more, not sure. What would one need to do when looking at a list of all the sites a user is a part of, though? Bulk remove them from those sites? Just look?

Note: See TracTickets for help on using tickets.