Site is up and down and up and down

I’ve had a blog on Dreamhost since February, and in the last few weeks my site’s performance has progressively degraded. It now suffers from frequent downtimes where I receive either 500 Internal Server Error messages or database connection errors. I can still FTP into my site, I can upload things and download static HTML files and images, I just can’t access anything that uses the database. Since my site is solely a Wordpress blog, this is a big problem for me.

A member of Dreamhost’s support staff suggested that the cause of the problem is my blog’s Wordpress theme. During a downtime a few days ago, he reverted the theme to the default and the problem seemed to clear up. However, I’ve been using the same theme for months without a problem, and when my site goes down I cannot access the admin page or the feed pages, both of which I think are independent of the blog theme. I also cannot connect to the database using phpMyAdmin (I receive an error that reads: “#2013 - Lost connection to MySQL server at ‘reading authorization packet’, system error: 0”). Just to check, during a downtime period yesterday I renamed the directory of my current theme as well as the Wordpress plugins directory, but that did not bring my site back up. I’m certain that traffic load isn’t destroying my site; my site doesn’t get very many visits at all.

So basically I’m not sure how to fix this. The problem generally resolves itself after some period of time, but having my site go down for four or five hours a day is obviously not an ideal situation. I’m not very experienced with using Wordpress and I’m even less familiar with troubleshooting it. I would like to have a stable site, however. Does anybody have any suggestions?