Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#50430 closed defect (bug) (duplicate)

wp_dropdown_users() memory exhausted for large user tables

Reported by: trek7k's profile trek7k Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Users Keywords:
Focuses: Cc:

Description

wp_dropdown_users() is used in many places throughout the admin, like /wp-admin/users.php where it's called for reassigning a deleted user's posts.

This function quickly exhausts memory (not to mention, browsers have trouble rendering such a large menu, and usability is impossible) for big user tables (400,000+ users, tested).

PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 19398624 bytes) in /var/app/current/wp-includes/user.php on line 1202

Instead of using an html select menu, a typeahead text box that queries the user database could be much more efficient and would solve the problem.

I'm classifying this as a bug and not an enhancement because for large sites, it is currently impossible to delete users as the script will often run out of memory at "Attribute all content to:".

Change History (2)

#1 @SergeyBiryukov
5 years ago

  • Component changed from General to Users
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #19867.

#2 @trek7k
5 years ago

Thanks Sergey, glad to hear it!

Note: See TracTickets for help on using tickets.