Rails FCGI cache

software development

#1

Hi

I have a working running Rails project here on Dreamhost, one that is running in development version and other that is using FCGI and running in production mode.

When I have to do some changes to the one in production mode, they won’t appear on the website until maybe hours later… which means that a simple typo means hours of downtime!.

Does anyone know how I can force FCGI to refresh so it reflects the code on the server?


#2

Run:

killall -USR1 dispatch.fcgi

This will send a USR1 signal to all of the running FCGI dispatchers. Dispatchers will terminate and be restarted the next time they receive a request.


#3

Does it matter where I run that from?


#4

No, you can run the command from any directory. I actually find that using TERM instead of USR1 works better for the current (and recent) Rails versions.

Just log in to your shell account and run:

killall -TERM dispatch.fcgi


#5

Thanks for your response; I just tried the -TERM version of the command, but I’m still getting the “no process killed” message, unfortunately. Thanks anyway, though!