[wp-trac] [WordPress Trac] #36815: (intermittently) Unable to upload media on very large network sites as a super admin.

WordPress Trac noreply at wordpress.org
Wed May 11 16:56:52 UTC 2016

#36815: (intermittently) Unable to upload media on very large network sites as a
super admin.
 Reporter:  withinboredom                        |      Owner:
     Type:  defect (bug)                         |     Status:  new
 Priority:  normal                               |  Milestone:  Awaiting
Component:  Media                                |  Review
 Severity:  normal                               |    Version:  4.4.2
  Focuses:  administration, multisite,           |   Keywords:
  performance                                    |
 - Large multisite installs (a couple thousand sites or more)
 - memcached
 - niginx
 - php-fpm
 - php5.5
 - Specific versions aren't related to the root cause of this bug.

 When uploading a file, 'admin_init' action is called, which eventually
 calls `_wp_admin_bar_init()` in wp-includes/admin-bar.php which calls
 `get_blogs_of_user()` in wp-includes/user.php which calls
 `get_blog_details()` for every blog the user has capabilities on. This
 results in long upload times for small files and in some cases causes the
 upload to fail as memcached has a throttle once a connection has surpassed
 a specific number of requests in a short time.

 Ideally, WordPress would cache the result of this expensive lookup and
 check the cache before querying the database or memcached so that
 uploading multiple files at one time doesn't cause an upload to fail or
 put strain on resources unnecessarily.

Ticket URL: <https://core.trac.wordpress.org/ticket/36815>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list