On Mon, 14 Jan 2019, Julien Cristau wrote: > the last few days our two bugs web hosts have been struggling. We've > got apache set up with RLimitNPROC 256, which means once www-data has > that many processes fork() dies with EAGAIN. > > In the case of version.cgi that means perl forking to run dot, for > libravatar.cgi it looks like it's either cp or convert. Either way, the > failure mode of fork returning EAGAIN is that perl does sleep(5) and > tries again. Over and over. Which means by the time something happens > the client has long gone, but we're still holding up one of the 256 > nproc slots not doing anything useful for quite a bunch of time.
Is there any reason why we're using RLimitNPROC instead of setting MaxClients? There's not much on bugs.debian.org which isn't served by a cgi script, so there's limited difference between the two for it, and as you can see, returning EAGAIN isn't particularly useful. [Those two CGI scripts actually just die() when system() returns non-zero, so it's probably perl internal system() bits which are sleep() and retrying.] -- Don Armstrong https://www.donarmstrong.com Those who begin coercive elimination of dissent soon find themselves exterminating dissenters. Compulsory unification of opinion achieves only the unanimity of the graveyard. -- Justice Roberts in 319 U.S. 624 (1943)