[Resolved] 500 Internal Server Errors with DreamHost
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.
try increasing memory on demand
Try adding this line to your wp-config.php file:
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.
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.
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.
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
.htaccessrule could be the source of the problem. To check for this, access your server via FTP or SFTP and rename the
.htaccessfile. If you can’t find a
.htaccessfile, 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.
“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.
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?
All depends on what you have on pages as videos and imagess are ones that use most ram
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:
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
I’ll be monitoring this for a couple of days to see what my memory usage is. Hopefully that simple tweak does the trick.
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:
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:
Using the Memory TCP plugin.
# 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?
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.
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.
- The topic ‘[Resolved] 500 Internal Server Errors with DreamHost’ is closed to new replies.