I have a bunch of scripts, but some of them are higher priority than others:
/var/www/normal-priority/script1.pl
/var/www/normal-priority/script2.pl
/var/www/normal-priority/script3.pl
and
/var/www/high-priority/script1.pl
/var/www/high-priority/script2.pl
/var/www/high-priority/script3.pl
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?
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:
You can also set limits for CPU and memory usage.