4 ms·
From what you've said, I doubt host swapping is a good idea - yet. First you need to get a good understanding of what's causing the system to run out of memory
by jbyers 18y ago
From what you've said, I doubt host swapping is a good idea - yet. First you need to get a good understanding of what's causing the system to run out of memory. One way to do this is to watch vmstat and top when the system is failing, or to install one of many system monitoring packages.
From what you've stated, I'll take a stab at what's going on. Apache processes are big, from a memory usage standpoint. A single Apache + mod_php could use 25 MB or more. If you have a dozen or more requests that hit at once -- or processes that are feeding slow clients -- blam, you've run out of memory.
One solution is to switch to lighttpd, nginx, or another webserver with a smaller footprint. Here a single process (or small set) serves a pool of PHP processes. But that's a bunch of work for a guess at what's going wrong.
Instead, try running nginx as a proxy in front of Apache, and let it spoonfeed slow clients. It's likely you will not need to change Drupal at all, and make only minor changes to Apache to do this. A good description is here: http://blog.kovyrin.net/2006/05/18/nginx-as-reverse-proxy/ http://blog.kovyrin.net/2006/05/18/nginx-as-reverse-proxy/