WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 500 Internal Server Error for ONE user after 3.5 upgrade (17 posts)

  1. hunsford
    Member
    Posted 1 year ago #

    Does anyone know what might cause a 500 Internal Server Error for ONE user account and no others?

    After upgrading to 3.5, one user is unable to access any of the sites after he logs in. He gets a 500 Internal Server Error any place he goes on the front end and in the admin screens.

    I have no problem accessing the sites, and neither do several other users. I was able to duplicate the issue myself by logging in as the user who is affected. As soon as I logged in as him, I received the same 500 Internal Server Error.

    Clearing cookies and restarting my browser cleared the session for me, which allowed me to access the front end and the login screen again, but logging back in as the user brings back the 500 Internal Server Error.

    The PHP log has warnings about wpdb->prepare (which I'm ignoring for now as they're warnings rather than errors) and some WordPress Database Errors related to one of the plugins. I tried deactivating that plugin, but there was no change in the 500 Internal Server Error for this one user.

    I know that I'm supposed to deactivate all plugins and use the default theme, but the sites are live, so I can't do anything like that until the weekend. I'd be fantastic if I could resolve the issue before then.

    The .htaccess file looks normal, but of course, why would a problem with the .htacess file affect just one user? I've looked at all the user postmeta in the database. Nothing looks unusual, but then again, I'm not sure what I'd be looking for.

  2. FYI the prepare issues: http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/

    If just ONE user is having issues, are there any special permissions or capabilities granted to him that makes him special?

  3. hunsford
    Member
    Posted 1 year ago #

    He's an administrator, but we have granted him no special privileges or capabilities (we're not using any role-modifying plugins, either, such as Tadlock's Members plugin).

    BUT here's something I did not notice before:

    If I look at him in the list of user records, he is not assigned to any sites (screen shot: http://screencast.com/t/byO6i24kI ). He's an admin (not superadmin) on over 200 sites. This list should be really long.

    When I look in the database, I see all the expected records related to capabilities and levels. Here's a snapshot of a just few records, but the full list of records is much longer: http://screencast.com/t/dEwSHfOJrc

    So according to the database, he is assigned as an administrator to all these sites. They're just not showing up on the admin screen.

    In addition, I must apologize: I have found another user account behaving in the same way (500 Internal Server Error upon login). I feel silly now for emphasizing "ONE," but this second account belongs to someone on maternity leave, so no one checked it yesterday. Anyhow, it's similar to the first account -- both are administrator accounts assigned to over 200 hundred sites (if you believe the database), and both look like they're assigned to exactly zero sites when you look on the Users admin screen.

    Not every administrator account is affected by this problem with the Internal Server Error, so I'm not able to "zero in" on the administrator role as the source of the problem.

  4. Huh... I wonder if you're running out of memory. I've seen that pop up with too-long menus, so it could be related.

  5. hunsford
    Member
    Posted 1 year ago #

    Yes, you're on to something! I changed the .htaccess to include:
    php_value memory_limit 512M
    (It was previously php_value memory_limit 256M.)

    I'm now able to login as this user instead of getting a server error, but it stalls out after the admin menu loads along the left side.

    I turned on debugging in the wp-config.php file (just on /wp-admin/, not the whole site), and after a bunch of warnings about deprecated functions, I saw this:

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 122880 bytes) in /mnt/stor8-wc1-dfw1/613997/www.realtronhomes.com/web/content/wp-admin/menu-header.php on line 101

    I increased to 1024M, but still ended up running out of memory:

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in /mnt/stor8-wc1-dfw1/613997/www.realtronhomes.com/web/content/wp-includes/cache.php on line 457

    So I clearly have a memory problem, but why only with these two users? I have another admin user who is assigned to just as many sites whose account still logs in without issue.

    Here's something that could be noteworthy. I created a child site called Tester and tried to add my two troublesome users to it. It failed both times. I got a white screen, yet received no messages about running out of memory. I am able to add other users to this site. (I end up with the same white screen when adding other users, but they do actually get added to the site. I can see they've been added when I load the Users screens. The troublesome users don't show up. They didn't get added.)

    I'm not sure there's much more I can do without deactivating plugins to see which one is making these two user accounts so unhappy. I wish I could duplicate the environment locally, but it's not feasible for me.

  6. So I clearly have a memory problem, but why only with these two users?

    Well. They're added to too many sites. Why them and not the other admin? Is he/she also a super admin?

  7. hunsford
    Member
    Posted 1 year ago #

    Ah, I see. The two admin accounts with trouble are assigned to 210 and 172 sites. The admin who can still login is assigned to just 133 sites.

    None of them is a superadmin. If I made them superadmins and unassigned them from individual sites, it would likely resolve the issue. Not sure if the Powers That Be will allow that.

    I will spend some time this weekend checking my plugins/theme to see which one is making these two user accounts so unhappy. I'll be sure to update this thread with the results, too.

    Thanks!

  8. Oh, yeah, that's it then. Too many sites.

    *ponder* I think at this point you MIGHT be able to do it if you were to remove the "my sites" button from the toolbar.

  9. hunsford
    Member
    Posted 1 year ago #

    Thanks. Didn't work, unfortunately.

    For anyone who is interested, here is the article that showed me how to remove My Sites from the admin toolbar:

    http://sumtips.com/2011/03/customize-wordpress-admin-bar.html

  10. Any chance you can increase PHP memory?

  11. hunsford
    Member
    Posted 1 year ago #

    Beyond 1024M? I can set it as high as I want, I suppose, but I don't know if the host can detect that sort of thing.

    I guess I considered 1024M to be excessive. To me, the idea of needing that much PHP memory is a sign that something is wrong. Am I off base?

  12. hunsford
    Member
    Posted 1 year ago #

    By the way, when I said, "I don't know if the host can detect that sort of thing," I guess I meant, "Detect it and slap my wrist for setting the memory too high."

  13. hunsford
    Member
    Posted 1 year ago #

    Sorry for serial posting, but I remember now that our host has contacted us in the past when they felt that scripts were consuming too many resources. So while I can set the memory as high as I wish using the .htaccess file, I think they'll get on my case about it.

  14. You can edit your posts for an hour after posting ;) Just saying.

    I guess I considered 1024M to be excessive. To me, the idea of needing that much PHP memory is a sign that something is wrong. Am I off base?

    You're not off base. But... really the answer is 'No user should be an admin of that many sites.' It's impractical for them to manage. Should they not be SuperAdmins at that point?

  15. hunsford
    Member
    Posted 1 year ago #

    You can edit your posts for an hour after posting ;) Just saying.

    (Slaps forehead.)

    Should they not be SuperAdmins at that point?

    We didn't want the admins to be able to access the network screens where they can create new sites and apply WordPress updates. In fact, the only reason they're admins and not editors is so they can access the screens to edit theme settings.

    Even so, the Powers That Be decided today to just make the guy a superadmin. I'm still in the process of removing his accounts from sites, but as soon as the list was down to about 135 sites, he could login again. And as soon as the list was down to about 40 sites, I could remove his account from a site without timing out.

    So where's your tip jar? Or your "Buy Mika a Beer" button?

  16. It's on halfelf.org ;) I like coffee.

    In fact, the only reason they're admins and not editors is so they can access the screens to edit theme settings.

    *BLEAH* I totally get why they want that, then. Damn, we need like a network Admin, which is an admin on all sites without the super-admin powers.

  17. hunsford
    Member
    Posted 1 year ago #

    Well, to sum it up:

    Assigning users to lots of sites can result in memory issues that prevent those users from logging in. I have resolved it by turning the user into a superadmin and unassigning him from all those sites.

    A big thanks to the Half-Elf Support Rogue for all her help!

Topic Closed

This topic has been closed to new replies.

About this Topic