Thanks again Plesk

For the last few days I have been wondering why I couldn’t get the number of HTTPD processes down to the level I configured in httpd.conf . I looked every where, tried to figure out if I was using prefork.c or worker.c tried multiple values, tested the server under load using Apache Bench and so on and on.

Still after multiple hours of testing, tweaking and changing values nothing seemd to change. Apache keeped spawining 25 to 30 processes which whould use 3 to 4 % memory each. Yes you can do the math that’s 90% just after 10 minutes of uptime. When using OpenVZ or Plesk it’s just waiting for a process to get killed becuase your VPS is hitting it’s memory limit.

So, I looked further, enabled mod_info (great tool for debugging problems with Apache) and there it was. After hours of searching I was looking at the wrong config file. It seems that Plesk installs a file called swtun.conf in /etc/httpd/conf.d/ . This file gets loaded after the prefork.c settings in httpd.conf are set. So, logically it overrules the values in httpd.conf rendering it completly useless. Would have been handy if that was somehow documented somewhere  …

Anyway, the values set in swtune.conf are pretty high for a small VPS. Adjusting them to about half of their defaults seems reasonable on non-highend VPSes.

Thanks again for the quest Plesk, not for the first time you’ve taken a few of my evenings away searching for a tiny little configuration value.