[Tip] Keeping fastcgi in memory

There has been discussion about using wget and curl to ping a server
every 5 minutes or so to keep the fastcgi processes alive. I didn’t find
a command line for this so I thought I’d post one.

Put this in your crontab using crontab -e or your favorite other method:

0-59/5 * * * * curl -r 0-99 http://somedomain.com>/dev/null 2>/dev/null

This hits the default page of somedomain.com every 5 minutes and dumps
the output into a black hole. If you’re lucky and have an HTTP 1.1
compliant version of curl, you will only yank 100 bytes of the page.

n.b., the page you hit should not be cached or it will bypass Rails and
serve up the static page.

Cheers