Why are my FTP uploads so extremely slow?

Joshua Muheim wrote:

I upload a Rails application it is sooooo extremely slow! :frowning: I have
about 20-30 minutes just to upload a 2mb rails application! This can't
be normal, can it?
I tried it with 3 different hosters, and all of them are this slow...

It's probably because a Rails application (particularly if you have a
frozen copy of Rails in vendor/rails) is made up lots and lots of small
files. The time is being taken up probably more by starting new file
transfer connections, and sending commands to the FTP server, rather
than by the actual data transfer. That's why it takes longer than a
single 2 MB file.

Having said that, 20-30 minutes is excessive. Maybe your FTP client is
particularly inefficient at sending lots of small files. What client
are you using? Have you tried using a different client?


also check your log files. your dev/test logs could be massive and slow you down if you’re trying to upload them.

See if the unzip command is available. If so, you just type "unzip
archive.zip" to expand the archive. "unzip -l archive.zip" is also
useful for seeing what's in the archive without actually expanding it.
(That's a dash L)

-- James

The question is what commands does your hoster support for extracting files? They could have tar or unzip or gtar or gunzip.

Assuming they have tar you’d do something like this…

  1. On the Mac: (example assumes app is in Sites folder and is named myrorapp; change as necessary)

cd ~/Sites

tar zcvf ./myrorapp.tgz ./myrorapp

  1. Then use SFTP to send the file to your hoster:

sftp myhoster.com

(log in)

put myrorapp.tgz


  1. Then unpack your app on your hoster’s server:

ssh myhoster.com

(log in)

mv myroroapp.tgz *deployment_directory * # change deployment_directory to your hoster’s directory assigned to Rails apps

tar zxvf myrorapp.tgz

Jose Hales-Garcia

UCLA Department of Statistics


If you've got ssh access, just use scp!

scp -r your-project user@yourhost.com:

That'll copy the your-project directory to your home directory at your
host. A lot simpler than doing all the compression/decompression.

It's possible that it will still be slow due to all the files, but it
seems unlikely. I only use scp to move my apps around and I never have