I have a bunch of scripts, but some of them are higher priority than others:




All running under mod-perl. They reside in separate directories.

From time to time, the normal-priority scripts get very busy, and the httpd servers "swamp out" the less frequently called high priority ones.

Is it possible to set aside n httpd servers so that they only listen for the "high priority" scripts?

  • 1
    Do they have to run under httdp or could they just run standalone? – Izzy Jun 24 '13 at 22:24

You can use the directive RLimitNPROC to limit the number of processes allowed to start in e.g. a directory. Since you're keeping the scripts in separate directories, this should work:

<Directory /var/www/high-priority>
  RLimitNPROC Max

<Directory /var/www/normal-priority>
  RLimitNPROC 4711  # Change this number to something that works for you

You can also set limits for CPU and memory usage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.