I have another related question but I'm deviating from it since I'm changing my server to use nginx instead of Apache.
Related: Server problems, running out of RAM, really high load average
I'm still having issues, though they're much easier to target now. Here's the situation with as much detail as I can give:
My wife has a WordPress site with quite a few plugins, including WooCommerce. Even with just the two of us surfing around non-stop (me with two browsers open, she with one), we're able to bring the server to a halt.
System specs: Debian 7.7, 512MB RAM, 512MB swap, 2 cores (speed unknown), nginx, PHP5-FPM, MySQL Server.
This screenshot of my terminal window pretty much tells the story:
The vmstat si/so values are at 0 (mostly) during light surfing. As we both surf the site at the same time, the values go way up, and htop shows some serious struggling going on. With the new nginx/php-fpm setup I have, if I simply run sudo service php5-fpm restart
, everything is fixed. The same problem occurs with Apache as well, if we surf the site at the same time, si/so skyrockets, and the site freezes, then it either recovers on its own after a while, or I have to restart Apache.
I'm at a loss here. I'd rather move forward with my nginx setup and troubleshoot that one. In that case, it seems like php-fpm is the issue maybe. But with just us hitting the server, this is pretty unacceptable. If she suddenly had 20 people at once visiting the site, we'd be screwed.
If it's a lost cause trying to run WordPress sites on a 512MB 2-core server, let me know. I may have to upgrade to a 1024MB/4-core.