Results 1 to 6 of 6

Thread: 500 internal server error

  1. #1
    BrianK's Avatar
    BrianK is offline Hello World
    Join Date
    Jun 2010
    Location
    Birmingham, AL
    Posts
    24

    Default 500 internal server error

    I'm a contributor to a popular blog, and the site administrator has been getting frequent 500 internal server errors when updating / publishing posts. He'e running 2.9.2 (I know, he's going to upgrade soon) and the Atahualpa theme. He probably uses about 30 categories and 200-300 tags total. I'm not sure who his host is, but when he contacted him, they responded with the following:
    The reason you receive the 500 error messages is because your site has been hitting the cap of 15 running processes. Whenever this happens any additional requests will be denied until a spot opens up. I noticed you had some long running accesses at your index.php. There were 6 index.php processes running on the server under your account with the shortest being 11 minutes and the longest being 113 minutes. Normally, when you access a site it generates a single running process for a moment and then once the site has loaded the process ends. This does not appear to be the case as your site is keeping these processes open.

    I have added the following entry to your .htaccess file:

    RLimitNProc 25

    This will raise your cap on running processes to the the server hard limit of 25. This gives you an additional 10 processes and should solve or alleviate your issue. If the issue continues, I would advise you to look at your website first as that is the source of the issue.
    Searching online about this problem brings results all over the board, and it seems there is a big debate about whether 500 errors are host or WP problems. I imagine it's probably neither, but rather a plugin or theme issue.

    Does anyone have a recommendation for common steps to take to find and then solve the problem? Thanks!
    "Learn something new every day to make up for all the things you forget."

  2. #2
    andrea_r's Avatar
    andrea_r is offline WordPress Rockstar
    Join Date
    Jan 2009
    Location
    Eastern Canada
    Posts
    1,325

    Default

    500 errors are server errors.

    It's not WP - it's a combination of the host and the fact the guy has a lot of traffic. He needs a better host.

    (though he could try caching, but that will be a stop-gap)

    this is a great example of a host that says they have all kinds of stuff, but really limit you when you hit the db hard. If the process are being kept open, IME it could be a stray plugin, it could mean the server needs tweaking.

    that's a LOT of cats & tags. If he's on shared, that's part of the issue.

  3. #3
    BrianK's Avatar
    BrianK is offline Hello World
    Join Date
    Jun 2010
    Location
    Birmingham, AL
    Posts
    24

    Default

    Thanks Andrea!

    Does anyone know if there is a way to monitor open processes? If we disable all plugins and enable back one by one it will be impossible to know unless he actually gets the error, which doesn't always happen, especially since the host upped his limit. That's what I find most difficult, is just identifying what's causing the error without shooting (totally) blind.
    "Learn something new every day to make up for all the things you forget."

  4. #4
    andrea_r's Avatar
    andrea_r is offline WordPress Rockstar
    Join Date
    Jan 2009
    Location
    Eastern Canada
    Posts
    1,325

    Default

    Even on a dedicated server with ssh access, that's one of the challenges.. er, I mean... fun part, yeah. ;P

    Here's some plugins that might help - knowing that running an extra plugin may actually drive things up a bit. ;)

    http://wordpress.org/extend/plugins/...-system-check/
    http://wordpress.org/extend/plugins/sqlmon/
    http://wordpress.org/extend/plugins/lighton/

  5. #5
    jtprattmedia's Avatar
    jtprattmedia is offline Hello World
    Join Date
    Oct 2010
    Location
    Adrian, MI
    Posts
    21

    Default

    I run into this a lot with people that have busy Wordpress websites. Personally I own websites on Wordpress that get from a dozen to 20,000 pageviews per day. I have clients that have guest spots on network tv shows, and get massive spikes to their WP blogs.

    More than likely you're on a shared web host. Your Wordpress site is taking more resources than they would like, and you're hitting their cap. I learned years ago that shared "unlimited"hosting is a lie. You are limited by the number of processes you can run, how much CPU you can use, how many "inodes" you have, and most have even more controls for bandwidth, the MySQL database server, etc.

    You've hit the wall because either:
    A. Your site is too busy
    B. Your site has a badly coded theme
    C. Your site has badly coded plugins or plugin conflicts
    D. All of the above

    You can try one of those plugins to monitor what going on, you can also try and get rid of all unused plugins, and also any plugins that aren't essential. If there are 40 plugins installed, well - that's a problem. Also, look for ridiculously large plugins, like the Simple:Forums or something that has a ton of it's own tables that would bog WP down. The more plugins you have installed (activated OR NOT), the slower WP is. WP has 13 db tables be default, login via phpMyAdmin and see if there are dozens of tables from plugins - another dead giveaway. "Optimize" all your db tables.

    If you don't get anything from all of this - moving to another host is a good idea, but probably won't solve your problem.

    First of all - you need a caching plugin. WP Super Cache is a good start, and it will cache all your WP pages to static HTML files. This should dramatically help with calls to the db and CPU usage from plugins.

    I've used WP Super Cache since it first came out, and IMHO W3 Total Cache is now much better. It *did* have problems on some servers, but the latest versions seem to work on most hosts. If you have any issues at all, I would move to HostGator - where you'll have no issues. The reason W3 Total Cache is (IMHO) the best caching plugin now out, is because it has a page cache, database cache, minification of scripts, and object cache, a browser cache, and it supports CDN's.

    That IMO opinion is the *bomb* - the W3 plugin w/CDN (content delivery network). My main sites run on this and the pages load like lightning, as fast as google. CDN's aren't free, but a shared webhost with a cached site + CDN is far cheaper than a dedicated box - and will save you from VPS server hell. VPS accounts are a complete ripoff if you ask me, and far worse than most shared hosting accounts.

    I posted about CDN's and W3 Total Cache last month on my blog here:
    http://www.jtpratt.com/cdn-for-wordpress/
    JTPratt Media
    Custom Wordpress Plugin and Theme Development
    Wordpress Website Maintenance and Security Hardening Services

  6. #6
    BrianK's Avatar
    BrianK is offline Hello World
    Join Date
    Jun 2010
    Location
    Birmingham, AL
    Posts
    24

    Default

    Thank you both! It looks like there is some work to do! I'll update once it gets figured out.
    "Learn something new every day to make up for all the things you forget."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •