WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 500 Internal Server Errors with DreamHost (30 posts)

  1. John
    Member
    Posted 4 years ago #

    FWIW DreamHost's shared server hosting has more or less become useless to me due to 500 Server errors...

    "But regardless, the problem is that you are using too much memory, and that your PHP processes are hitting our process watcher which is why it's showing the 500 error."

    So basically the amount of storage space and bandwidth is immaterial. The problem, for me anyway, with DreamHost shared hosting and WordPress is the amount of memory allotted- and they don't give you that information- they won't tell me how much memory I'm using or how much I'm allowed.
    This is a single WP install on a unique user with little to no traffic and Super Cache installed.
    It's happening on all my WP sites but where I have more active plugins it's worse.
    I was looking forward to WP 3 and multi-sites. I don't feel confident in even trying a multi-site install on DreamHost.
    This only started happening around April 2010 when I was moved to a new server. I was previously happy at DH. Wouldn't recommend it to anyone running WP now.

  2. Samuel B
    moderator
    Posted 4 years ago #

    try increasing memory on demand
    Try adding this line to your wp-config.php file:
    define('WP_MEMORY_LIMIT', '96M');

  3. kwdavids
    Member
    Posted 4 years ago #

    I've had the 500 errors too from time to time when the traffic spikes. How many sites are you trying to run at the same time on DreamHost? That in an of itself might be the issue, and unfortunately for some really odd reason, DreamHost will not sell you multiple accounts.

    DreamHost has some some very good tutorials on optimizing WordPress and reducing memory. It mentions some plug-ins that are real memory hogs.

    My site averages serving about 11,000 pages a day and works OK at that level. I keep my plug-ins to a minimum and use WP Super Cache and WP Widget Cache. I figure the secret to keeping memory usage down is for users to get in and get out fast, and I have my page generation times down to about half a second. I also have FAST-CGI enabled, but that is only because my blog is heavily commented.

  4. John
    Member
    Posted 4 years ago #

    Thanks for the feedback! Adding the memory on demand line to my wp-config file helped me out of a jam when I started getting out of memory errors and the site wouldn't come up at all.
    I probably have about 30 sites on my DreamHost acct. however, as per their suggestion, the problem sites are on their own unique user, and memory is allotted by user, not account, as I understand it.
    I'm using the FeedWordPress plug-in to aggregate Tweets via RSS. Probably that takes a lot of memory. I'm mostly just having fun and experimenting, the sites are getting little to no traffic.
    Once there's a SuperCache page, the site loads quite quickly. But when the page is being created it can take upwards of 30 seconds or so. That's when I get the 500 errors.
    But I was looking forward to doing some experimenting with WP 3.0 multi-sites. Now I'm thinking I won't even bother. I'll wait til I hear where people are having success running multi-sites on another Host and get an account there.
    Congratulations on your blog and thanks again.

  5. Russell Heimlich
    Member
    Posted 3 years ago #

    I've recently been having this issue myself. Same deal as you. Small wordPress blog, using a cacheing plugin, WordPress 3, separate user etc. It gotten so bad that I decided to put Google Analytics on my Internal Server Error page to track how frequently this is happening. The results are scary. I don't know what to do to reduce the amount of memory WordPress uses.

  6. Internal server errors (error 500) are often caused by plugin or theme function conflicts, so if you have access to your admin panel, try deactivating all plugins. If you don't have access to your admin panel, try manually resetting your plugins. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, try switching to the Default theme (WordPress 1.5 - 2.9.2) or the Twenty Ten theme (WordPress 3.0 and higher) to rule-out a theme-specific issue. If you don't have access to your admin panel, access your server via FTP or SFTP, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the Default theme (WordPress 1.5 - 2.9.2) or the Twenty Ten theme (WordPress 3.0 and higher) to activate and hopefully rule-out a theme-specific issue.

    If that does not resolve the issue, it's possible that a .htaccess rule could be the source of the problem. To check for this, access your server via FTP or SFTP and rename the .htaccess file. If you can't find a .htaccess file, make sure that you have set your FTP or SFTP client to view invisible files.

    If you weren’t able to resolve the issue by either resetting your plugins and theme or renaming your .htaccess file, we may be able to help, but we'll need a more detailed error message. Internal server errors are usually described in more detail in the server error log. If you have access to your server error log, generate the error again, note the date and time, then immediately check your server error log for any errors that occurred during that time period. If you don’t have access to your server error log, ask your hosting provider to look for you.

  7. Russell Heimlich
    Member
    Posted 3 years ago #

    "Premature end of script headers" shows up a lot in my error logs. The referrer varies from index.php for public facings pages to post-new.php and admin-ajax.php for admin tasks.

    I contacted Dreamhost about the issue and they came back with the following:

    I took a look, and it looks like your scripts are still getting killed by
    our procwatch daemon for using too much RAM, which is what helps keep
    users from affecting others on their shared server.

    2010-10-05 21:45:10 procwatch2 INFO: Process(pid=28716, name='php5.cgi',
    uid=kingkool68(702960), tty=None: kill for total RAM

    So it looks like I need to reduce WordPress' appetite for RAM.

  8. Try deactivating a few unnecessary plugins.

  9. Russell Heimlich
    Member
    Posted 3 years ago #

    I'll give a try and see what happens. IS there an easy way to figure out how much RAM WordPress is using for an individual page call?

  10. govpatel
    Member
    Posted 3 years ago #

    All depends on what you have on pages as videos and imagess are ones that use most ram

  11. I know we're talking about removing plugins, but this one should help you pinpoint the memory problems, or at least show you how much your memory usage decreases when you start deactivating plugins:

    http://wordpress.org/extend/plugins/tpc-memory-usage/

  12. Russell Heimlich
    Member
    Posted 3 years ago #

    Wow thanks James. That plugin is the perfect tool for diagnosing memory usage.

    And because of it I noticed a simple omission on my part. In the memory usage report I noticed
    PHP Memory Limit: 90M
    WordPress Memory Limit: 32M

    Well that looks like it could be causing a problem. So I went to my wp-config file and added

    define('WP_MEMORY_LIMIT', '90M');

    I'll be monitoring this for a couple of days to see what my memory usage is. Hopefully that simple tweak does the trick.

  13. John
    Member
    Posted 3 years ago #

    My site is built around a busy plugin (Feed WordPress), so turning it off isn't really an option. DreamHost won't tell me how much memory I'm using or how much I'm allotted so I don't really have enough information to understand the problem. I think this TPC memory plugin will help, Thanks! I've heard of people having memory issues with VPSs as well, so before I move to another hosting company or a VPS, I want to have a good idea of how much memory I'm using.
    Here are the links the DreamHost people sent me about memory issues.

    DreamHost: All right it looks like you're hitting our process watcher. This exists to make sure no one exceeds the memory limits on your shared server which would cause problems for all the other users on the server. When your script(s) consume too much memory, it will kill the process. The end result is an entry in your error.log and a 500 error on your page. We have a few wiki articles that may help you find the source of this and troubleshoot it further:

    http://wiki.dreamhost.com/index.php/Finding_Causes_of_Heavy_Usage

    http://wiki.dreamhost.com/User_resource_reporting

    http://wiki.dreamhost.com/index.php/Bots_spiders_and_crawlers

    DreamHost: Since you're also using WordPress for this site, definitely check out the wiki pages below as well as they contain information specific to optimizing WordPress:

    http://wiki.dreamhost.com/WordPress_Optimization

    http://wiki.dreamhost.com/Fine_Tuning_Your_WordPress_Install

    http://wiki.dreamhost.com/Wordpress_performance

  14. John
    Member
    Posted 3 years ago #

    Using the Memory TCP plugin.
    With plugins:
    # Usage Sample: 34.23MB
    # Peak Usage: 35.4MB
    # All-Time: 78.44MB on 10/16/10 @ 4:03 am (shutdown)
    # Load Averages: 0.55 0.76 0.77

    Without (except WP SuperCache and the TCP Memory plugin):
    # Usage Sample: 24.43MB
    # Peak Usage: 24.66MB
    # All-Time: 78.44MB on 10/16/10 @ 4:03 am (shutdown)
    # Load Averages: 1.06 1.11 0.91

    Can anyone translate that for me? Does it suggest about where the DreamHost process watcher is set at if I'm not getting 500s when the plugins are not running?
    How does my memory usage compare to an average WP install?
    Thanks!

  15. The first set of results is a bit high for an "average" WordPress installation and the second set is about right.

    Now all you need to do is begin reactivating each plugin individually until you find which one is hogging the most memory.

  16. John
    Member
    Posted 3 years ago #

    Thanks James, that gives me a frame of reference. The difference between the two results above are my FeedWordPress plugins. Since this particular site is built around what they do, turning them off isn't really an option. But at least now I have a good idea of what my minimal memory requirements are. That will help in the search for alternative hosting solutions.

  17. You're welcome!

  18. Russell Heimlich
    Member
    Posted 3 years ago #

    There are a few ways to reduce your 500 Internal Server Errors on Dreamhost.

    For one, move to the site to it's own user account. If you run multiple sites under one user these all share the same RAM resources making it easier to hit that magic limit and trigger there process watcher to kill your processes.

    Your peak usage of 35.4MB is on par with my WordPress set-up and it seems to be doing much better under it's own user account.

  19. John
    Member
    Posted 3 years ago #

    Thanks kinkool, but exactly! I'm already running a single WP install on a unique user account and with SuperCache enabled. I've done everything the DH support suggests that doesn't require command line sysop expertise. I have a few other WP installs that are lighter and they mostly run fine, only occasional 500s. I was moved to a new server in the last 6 months. That seems to be about when my troubles started, but that's only anecdotal.
    But I guess the takeaway is that until hosts publish how much memory comes with their shared hosting, we don't really know what we're getting.

  20. Rhand
    Member
    Posted 3 years ago #

    @ johnh23 Did not manage to bring down the your memory usage? Any particular plugins that were the cause?

  21. John
    Member
    Posted 3 years ago #

    Nothing new to report. Still having issues as outlined above. Most likely the FeedWordpress plugin and depending on how big a feed it has to parse.
    But I wish there was more transparency with hosting companies in this area. DreamHost, HostGator, GoDaddy, etc, none of them advertise the amount of memory that comes with an account.

  22. Rhand
    Member
    Posted 3 years ago #

    But I wish there was more transparency with hosting companies in this area. Dream Host, HostGator, GoDaddy, etc, none of them advertise the amount of memory that comes with an account.

    Me too. I am now just left alone trying to lower the memory usage. Either that or a VPS. TPC Memory usage is fortunately a free WordPress plugin that at least can shed some led on the site's usage.

  23. John
    Member
    Posted 3 years ago #

    By far the MOST frustrating thing about DreamHost 500 errors is this:
    Briefly unavailable for scheduled maintenance. Check back in a minute.
    You're in the middle of updating WP or plugins and you get an error while inside the WP dashboard. You have to ftp into your blog and delete the Maintenance file, which is hidden. Happens all the time.

  24. westcoastcontent
    Member
    Posted 3 years ago #

    Having the same issue with tasks I typically do that does not happen on my other host.

    I have a number of sites that are based on different topics but have the same structure and plugins. I started on Bluehost and recently decided to launch my newest on on DreamHost to compair.

    Tasks I usually run such as add a new catecory or tag and then apply it to existing posts usually results in this listed 500 error, this NEVER happens with the same site setup different content on bluehost.

    I'm still in trial, but will not stay if this cannot be resolved.

    New site I am building on dreamhost
    http://onlinecomputersupportandrepair.com/

    Existing site on bluehost
    http://freeappliancerepairmanonline.com/

  25. Ian
    Member
    Posted 3 years ago #

    I've been having the same problems with increased frequency. It's pretty ridiculous - I've been running wordpress on dreamhost for years, same set up, very little content, only about 20-50 unique visitors a day and I'm getting 500 errors all the time just while trying to make new posts or edit tags, etc. Even deleting a spare theme in the backend! Or just visiting my stats page.

    Have any of you moved? Any good alternatives? I'm starting to feel they are just not the solution.

  26. govpatel
    Member
    Posted 3 years ago #

    Some times you will get that error if there are is problem on server

  27. John
    Member
    Posted 3 years ago #

    Yes, I have some very simple, easy-on-the-plugins sites as well where it's pretty much impossible to get through even adding a new post without hitting 500 errors.
    Hostgator has a similar shared hosting product but I haven't tried them yet.

  28. govpatel
    Member
    Posted 3 years ago #

    Host gator is more reliable as I am using it for one of my cleint

  29. Ian
    Member
    Posted 3 years ago #

    the tech support people are very unhelpful, they just keep telling me that wordpress is terrible at memory usage. Since it's such a common platform, I'm not really accepting that. One site has only two plugins, both common (wp stats, askimet) and STILL hits 500 errors on loading the image upload script. I feel like there is something very wrong there.

  30. Rhand
    Member
    Posted 3 years ago #

    I have had a lot of issues with one WordPress site with Dreamhost. It uses Shopp mind you so server demand was a bit higher than average, but the load I had was way off. I also had to take care of debugging myself once they cut me off using their proc script. Dreamhost Wiki has tips you can use though. See http://wiki.dreamhost.com/WordPress_Optimization and http://wiki.dreamhost.com/Fine_Tuning_Your_WordPress_Install . If those do not help:
    1/TPC Memory usage plugin is fortunately a free WordPress plugin that at least can shed some led on the site's usage. Install it and use it using different WP/plugins combinations. If certain plugins stick out see if they can be upgraded/reinstalled.
    2/Check if your wp-config.php is OK and connects to a local server and not a remote server. The latter can cause an enormous server load. So check config for DB connection, sef url rule and so on.
    3/Check if plugins are well configured and no impossible SQL or HTTP requests are being made. This you can check by checking the server logs (PHP/HTTP) and or MySQL log. If a proper MySQL connection cannot be established and requests keep on being made that causes a huge server load. Asking for many non existing files or running wrongly composed scripts can cause a large server load as well.

Topic Closed

This topic has been closed to new replies.

About this Topic