Re: FCGI Scripts: spawner/reaper

Stoyan Zhekov
Tue, 06 Dec 2005 05:38:45 -0000

On 12/6/05, Hunter Hillegas
<lists-HAWAbpnI61OZ1JSuHaJ1sQC/G2K4zDHf@public.gmane.org>
wrote:
> Still, if anyone has used either of these scripts, I am interested in your
> experience:
>
> script/process/reaper
> script/process/spawner
> script/process/spinner

1. spawner - it''s a very thin wrapper around spawn-fcgi (which is
comming with lighttpd installation, used for creating standalone (not
managed by the web server) listeners). It''s just one line command with
several lines for environment setting:

OPTIONS[:instances].times { |i| spawn(OPTIONS[:port] + i) }

starting ''times'' instances of spawn-fcgi , starting from :port
.
spawn-fcgi can be used also directly - see [
http://rubyists.com/articles/2005/05/03/spawn-fcgi-in-the-foreground ]

2. spinner - "It''s a brute-force attempt that''ll just try
to run the
spawner every X number of seconds".

3. reaper - keeping track of the spawned fcgi listeners for managing
them - restart etc.

spinner + reaper can be replaced with runit - [
http://smarden.org/runit/ ] or supervise - [
http://cr.yp.to/daemontools/supervise.html ] from the DJB daemontools
package [ http://cr.yp.to/daemontools.html ]