The Hidden Dangers of Beautiful Themes
g33klaw.com
g33klaw.com
Always some enthusiasts argue me, while some others say the mentioned 'oh, just cache it'. Some time ago there was also the post about the first page of google results on 'wordpress free themes' proving that most of it had malware. People (mainly amateurs) should understand that while wordpress (love it or hate it, there are lots of reasons) is legit, the whole ecosystem of themes and plugins is by many means occupied by amateurs who can set up a php website and some html but don't know crap about performance and/or security, and also spammers and other devs with malicious intentions. Use wp, but be aware of that and be careful what you're doing when installing third-party extensions.
That said, W3T is really great for caching and CDN setup...takes like ten minutes to get going.
It looks like the new theme caused each mod_php process to increase some amount, and that wasn't taken into consideration. Once the requests started piling up Apache started swapping, killing the server.
W3 Total Cache could've been installed to serve up cached static files direct from Apache, without spinning up PHP. All of the images could've been off loaded to cloud front or S3 or any other supported CDN to relieve that stress and W3 Total Cache also has a feature to combine all of your CSS and JS files into 1 to cut down on those requests as well.
You're running on a VPS, you should have some idea of how the system is setup and how memory is used. You've taken the time to setup the VPS and your rails apps, take 5 minutes to properly setup Apache and WordPress caching.
Rails does so much good stuff "for free", such as when deploying to production it combines all static files (css/js) into one file automatically and also minifies it. That means your 15 external http requests get reduced down to 1 or 2 tiny ones.
I'm not saying Rails and Wordpress perform the same job - they don't, but I do find it amazing that other frameworks / engines don't adopt such obvious best practices like the one example I've given.
Letting the php app server (apache in most wordpress cases) handle things it shouldnt is the real issue here, everytime apache has to serve a static file, that worker process can't render or even serve cached pages.