RailsPlayground
How To use FastCGI

  1. Edit the public/.htaccess file
    1. Find the line AddHandler fastcgi-script .fcgi and comment it out, this is not needed since this is already configured by Apache.
      #AddHandler fastcgi-script .fcgi
      
    2. Find the line in the .htaccess file containing dispatch.cgi and change this to dispatch.fcgi

Your application should now be running using FastCGI

restarting fcgi

  • Your FastCGI instances can be killed using the following command, they will be respawned automatically on the next request. This allows you to reload your application for changes in your code to be applied.
    killall -usr1 dispatch.fcgi
    

    You will see some operation not permitted messages, this is normal, your dispatcher has been killed.
  • Or:
    You may need to restart the fastcgi processes if any are running. To do that type:
    ps ux | grep dispatch.fcgi
    

    The output for this command would be something like the below sample ( if dispatch.fcgi has been properly started for your application )
username PID 0.0 0.9 xxxx xxxx date time /usr/local/bin/ruby dispatch.fcgi

You just need to issue a command

kill -9 PID

PID would be the Process IDentifier ( a numeric value ). You will need to substitute the PID value of the process in the above command.