[wp-trac] [WordPress Trac] #25184: confirm_delete_users() causes fatal error on site with large userbase

WordPress Trac noreply at wordpress.org
Thu Aug 29 19:29:55 UTC 2013


#25184: confirm_delete_users() causes fatal error on site with large userbase
---------------------------+-----------------------------
 Reporter:  rodrigosprimo  |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Multisite      |    Version:  3.6
 Severity:  normal         |   Keywords:  has-patch
---------------------------+-----------------------------
 I have a site running WordPress MS, with 14000+ registered users and
 memory_limit at 256M. If I go to delete an user there is a fatal error
 (Allowed memory size of 268435456 bytes exhausted) when trying to generate
 the select box with the list of users inside confirm_delete_users() in wp-
 admin/network/users.php.

 It seems to me that this is happening because the call to get_users() is
 too generic and the function is trying to return all users fields
 (including meta data) and only the ID and user login are necessary to
 populate the select box.

 I'm attaching a patch that makes get_users() fetch only the required
 fields and this dramatically reduces the number of queries executed by
 this function. Thus preventing the fatal error from occurring.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25184>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list