Topic: Deploying with Passenger & FTP. how to avoid downtime during?

Hey.
Im deploying using FTP on my Passenger run Rails App
Everything runs fine except when i'm actually FTPing up new files, there is often a minute or two of downtime during this as the old files are rewritten with the new.

Previously i'd not noticed this.. and i thought that no changes took place on the server until i touched the 'restart.txt' file

Anyway my question is simply does anyone have a solution to avoid this?

Thanks

Re: Deploying with Passenger & FTP. how to avoid downtime during?

How are you getting at the ftp?

ftp = Net::FTP.new('remote-ftp-server') ?

You could try various Rails async processing , try

http://backgroundrb.rubyforge.org/

There are others.

I forget which one I played with,  but it was pretty simple to wrap your ftp in a block that will return immediately and run the ftp in the background.






http://www.slideshare.net/jondahl/async … 008-443159

Last edited by BradHodges (2011-10-07 13:47:50)

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Deploying with Passenger & FTP. how to avoid downtime during?

Sorry, i mean i am FTP uploading my updated source code for my RoR site. then when that is finished i touch 'restart.txt' which restarts the Passenger server..

But during the FTP uploading of the new files, the site will go through various stages of being down. 500 errors etc

Re: Deploying with Passenger & FTP. how to avoid downtime during?

get a hold of RSYNC,  that way you'll only copy files that have actually changed.

That would probably eliminate ANY 500 errors.

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Deploying with Passenger & FTP. how to avoid downtime during?

Thank you. looking into it now.