• We have a multisite environment with 160 active subsites and nearly 700 users. When admins attempt to access /wp-admin/users.php, the page will time out with “500 Internal Server Error | nginx”. I’ve isolated the problem to the code on lines 189-200 in /modules/login-security/classes/controller/users.php:

    public function can_activate_2fa($user) {
    if (is_multisite() && !is_super_admin($user->ID)) {
    $blogs = get_blogs_of_user($user->ID);
    foreach ($blogs as $id => $info) {
    if ($this->_user_can_for_blog($user, $id, Controller_Permissions::CAP_ACTIVATE_2FA_SELF)) {
    return true;
    }
    }
    return false;
    }
    return user_can($user, Controller_Permissions::CAP_ACTIVATE_2FA_SELF);
    }

    It appears to test every user and iterate over every subsite. The problem went away when I commented out the “if” statement. It would be best if there was a way to circumvent this code in the settings.

    Mark Pemburn
    Web Application Administrator
    Clark University

    • This topic was modified 1 year, 6 months ago by mpemburn.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @mpemburn, thanks for your observation.

    Do you use the “Screen Options” at the top of the Users page? Is?Number of items per page?set to the default of 20, or is it higher?

    Using a lower value may work as a temporary fix, since it won’t need to call that function as often. Are you also on the current version of WordPress or an older one?

    Thanks,
    Peter.?

    Thread Starter mpemburn

    (@mpemburn)

    Hi @wfpeter,

    The number of items is set to the default of 20, so it’s getting the full user list on the back end.

    Mark

    Plugin Support wfpeter

    (@wfpeter)

    Thanks @mpemburn, thanks for that.

    Our team has been looking into a solution for servers where this is an issue. Could I just clarify the WordPress version you’re running to assist their testing?

    Thanks again,
    Peter.

    Thread Starter mpemburn

    (@mpemburn)

    Hi @wfpeter,

    Thanks! We’re on version 6.3.1.

    Mark

    Thread Starter mpemburn

    (@mpemburn)

    Hi?@wfpeter,

    Any progress on this?

    Mark

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bug causes timeout when accessing user list in multisite’ is closed to new replies.