WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 3 months 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
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 6 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 (16)

comment:1 ramoonus3 years ago

have you turned on debugging?
and increased php memory_limit

comment:2 luuzan@…3 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 SergeyBiryukov3 years ago

  • Keywords needs-patch added

comment:4 nacin3 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@…3 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

Version 0, edited 3 years ago by luuzan@… (next)

comment:6 PeteMall2 years ago

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

comment:7 edward mindreantre2 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@…2 years ago

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

comment:9 in reply to: ↑ 8 edward mindreantre2 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 dd322 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@…2 years ago

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

csixty46 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: csixty44 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 SergeyBiryukov4 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 4 months ago by SergeyBiryukov (previous) (diff)

comment:14 jeremyfelt4 months ago

  • Component changed from Administration to Network Admin

comment:15 nacin3 months ago

  • Component changed from Network Admin to Networks and Sites
  • Focuses administration added
Note: See TracTickets for help on using tickets.