Forums » Development »
Feature: max_procs for lighttpd
Added by m.schwarzbauer almost 11 years ago
Hello *!
We are using lighttpd with one additionally implemented feature.
Summary:
We use mod_cgi and we want to ensure that the server can't flood our system with forking XX cgi processes parallel. So we added an additional configuration parameter which limits the number of parallel processes forked by lighttpd ( especially our cgi processes )
Configuration:
server.max_procs=0 (unlimited number of processes could be forked)
server.max_procs=10 (max. 10 parallel processes could be forked)
Details:
Implementation uses linux specific function getrlimit/setrlimit.
Anyone interessted on this feature? I can submit code .... it's quite simple...
cheers,
Martin
Replies (2)
RE: Feature: max_procs for lighttpd - Added by stbuehler about 8 years ago
Hi Martin,
I don't think a global server limit is very useful; a lot of people probably would then like a "per vhost/location" limit and so on (for example you wouldn't want to block admin access). Setting limits can be done outside of lighttpd anyway (e.g. with LimitNPROC= in systemd), I don't think we need to support this corner-case.
Also the NPROC
limit is a dangerous one; cronjobs running with the same user could easily block mod_cgi
completely.
I'd rather see that feature in fcgi-cgi, and using manual counting instead of the NPROC
limit - mod_cgi
has a lot of issues mod_fastcgi
doesn't have.
In general you can submit your feature requests (including patch) as issue (just select "Feature" as tracker); they are less likely to get lost - and even if I don't apply them upstream it might still help others.
RE: Feature: max_procs for lighttpd - Added by gstrauss over 7 years ago
See #1530 for user-submitted patch for cgi max procs. YMMV.