# FCGI Scripts: spawner/reaper

**URL:** <https://www.ruby-forum.com/t/fcgi-scripts-spawner-reaper/61669>\
**Category:** Rails\
**Created:** [December 5, 2005, 11:49pm UTC](https://www.ruby-forum.com/t/fcgi-scripts-spawner-reaper/61669 "2005-12-05T23:49:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/cdc98d/32.png) [@lists](https://www.ruby-forum.com/u/lists)\
**Post date:** [December 5, 2005, 11:49pm UTC](https://www.ruby-forum.com/t/fcgi-scripts-spawner-reaper/61669/1 "2005-12-05T23:49:48Z")

</div>

We are doing performance testing for Rails site that will be going live  
soon  
and probably see a fair amount of traffic.

We are currently using FCGI for deployment (though we may switch to SCGI  
down the line as it matures).

I noticed the addition of a few FCGI related scripts to Rails, such as  
reaper and spawner.

Has anyone used these? Any experiences to share?

Should I consider them mandatory if I am using FCGI for deployment?

Thanks.

---

<div class="post-metadata">

**Author:** ![lists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/cdc98d/32.png) [@lists](https://www.ruby-forum.com/u/lists)\
**Post date:** [December 6, 2005, 12:58am UTC](https://www.ruby-forum.com/t/fcgi-scripts-spawner-reaper/61669/2 "2005-12-06T00:58:48Z")

</div>

On Dec 5, 2005, at 2:49 PM, Hunter H. wrote:

> Has anyone used these? Any experiences to share?
> 
> Should I consider them mandatory if I am using FCGI for deployment?
> 
> Thanks.

Hunter-

```
I have a write up from August about the development and deployment

```

of a fairly large rails site for the Yakima Herald newspaper. Maybe  
this helps give you a little perspective? [http://brainspl.at/](http://brainspl.at/)  
articles/2005/11/03/from-start-to-launch-http-yakimaherald-com

Cheers-  
-Ezra Z.  
Yakima Herald-Republic  
WebMaster  
[http://yakimaherald.com](http://yakimaherald.com)  
509-577-7732  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![lists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/cdc98d/32.png) [@lists](https://www.ruby-forum.com/u/lists)\
**Post date:** [December 6, 2005, 1:51am UTC](https://www.ruby-forum.com/t/fcgi-scripts-spawner-reaper/61669/3 "2005-12-06T01:51:32Z")

</div>

Thanks very much for sharing your story. Interesting stuff.

Still, if anyone has used either of these scripts, I am interested in  
your  
experience:

script/process/reaper  
script/process/spawner  
script/process/spinner

Thx.

---

<div class="post-metadata">

**Author:** ![lists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/cdc98d/32.png) [@lists](https://www.ruby-forum.com/u/lists)\
**Post date:** [December 6, 2005, 2:11am UTC](https://www.ruby-forum.com/t/fcgi-scripts-spawner-reaper/61669/4 "2005-12-06T02:11:48Z")

</div>

Hunter H. wrote:

> Thanks very much for sharing your story. Interesting stuff.
> 
> Still, if anyone has used either of these scripts, I am interested in your  
> experience:
> 
> script/process/reaper  
> script/process/spawner  
> script/process/spinner

I use reaper all the time. It’s the most efficient way to reload a  
production  
Rails app after a code change. I haven’t had any need to use spawner or  
spinner  
as of yet, so I really can’t comment on them. But reaper works great.

-Brian

---

<div class="post-metadata">

**Author:** ![lists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/cdc98d/32.png) [@lists](https://www.ruby-forum.com/u/lists)\
**Post date:** [December 6, 2005, 6:39am UTC](https://www.ruby-forum.com/t/fcgi-scripts-spawner-reaper/61669/5 "2005-12-06T06:39:48Z")

</div>

On 12/6/05, Hunter H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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](http://rubyists.com/articles/2005/05/03/spawn-fcgi-in-the-foreground) ]

1. spinner - “It’s a brute-force attempt that’ll just try to run the  
spawner every X number of seconds”.

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

spinner + reaper can be replaced with runit - [  
[runit - a UNIX init scheme with service supervision](http://smarden.org/runit/) ] or supervise - [  
[http://cr.yp.to/daemontools/supervise.html](http://cr.yp.to/daemontools/supervise.html) ] from the DJB daemontools  
package [[http://cr.yp.to/daemontools.html](http://cr.yp.to/daemontools.html) ]

---

<div class="post-metadata">

**Author:** ![lists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/cdc98d/32.png) [@lists](https://www.ruby-forum.com/u/lists)\
**Post date:** [December 6, 2005, 2:44am UTC](https://www.ruby-forum.com/t/fcgi-scripts-spawner-reaper/61669/6 "2005-12-06T02:44:16Z")

</div>

Hunter H. wrote:

> Thanks very much for sharing your story. Interesting stuff.
> 
> Still, if anyone has used either of these scripts, I am interested in your  
> experience:
> 
> script/process/reaper  
> script/process/spawner  
> script/process/spinner
> 
> Thx.

Hi. In case you hadn’t found it, there is some documentation here, in  
the SwitchTower manual:

http:manuals.rubyonrails.com/read/chapter/100#page268

regards

```
Justin
```
