Why are my FTP uploads so extremely slow?

Hi all

I know, this hasn’t really to do with Rails, but my problem is that when
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…
When I try to upload a single big file like a 100mb MP3 file then I get
a much better upload speed…

What could be the problem here? I’m really getting frustrated with this
stuff…

Thanks for help,
Joshua

On 9/15/06, Joshua M. [email protected] wrote:

stuff…
You should post this on a support forum for one of the hosting
providers that you use.

Joshua M. wrote:

when
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?

Chris

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

On 9/15/06, Chris M. [email protected] wrote:

frozen copy of Rails in vendor/rails) is made up lots and lots of small


Ed Hickey
Developer
Litmus Media
816-533-0409
[email protected]
A Member of Think Partnership, Inc
www.ThinkPartnership.com
Amex ticker symbol: THK

Thank you guys. I’m using CyberDuck on OSX, but I will try Fugu now…
Maybe it’s faster.
Anyway it’s sad that one can’t upload as a zip file and then extract it
on a server… This would speed things up.

I’ll let you know about further happenings.

LOL I don’t even get Gugu to work… it asks me for a password and then
it redisplays the server details input form… :open_mouth:

The biggest problem isn’t the slow upload anyway (I got time, you know
:wink: ), but the periodically occuring errors when uploading… E.g. I
tried now to upload the 2mb Rails project, and after about 600kb it
tells me

I/O Error: Read timed out (some_file.jpg)

This is just impossible… :frowning:

Joshua M. wrote:

Thank you guys. I’m using CyberDuck on OSX, but I will try Fugu now…
Maybe it’s faster.
Anyway it’s sad that one can’t upload as a zip file and then extract it
on a server… This would speed things up.

I’ll let you know about further happenings.

Hi Joshua,

The previous poster got it right, it’s the numerous small files that are
slowing things down. I don’t understand, why can’t you zip the project,
upload and extract it?

On 9/16/06, Joshua M. [email protected] wrote:

The previous poster got it right, it’s the numerous small files that are
slowing things down. I don’t understand, why can’t you zip the project,
upload and extract it?

Hrm yeah, why not? I have SSH/Telnet access on my hoster
(HostMonster.com), so it should be possible to extract a zip using some
command line tools, right? Oh, me poor GUI user… :wink: Which one should
I use to extract the archive?

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 previous poster got it right, it’s the numerous small files that are
slowing things down. I don’t understand, why can’t you zip the project,
upload and extract it?

Hrm yeah, why not? I have SSH/Telnet access on my hoster
(HostMonster.com), so it should be possible to extract a zip using some
command line tools, right? Oh, me poor GUI user… :wink: Which one should
I use to extract the archive?

On Sat, Sep 16, 2006, Joshua M. wrote:

Hrm yeah, why not? I have SSH/Telnet access on my hoster
(HostMonster.com), so it should be possible to extract a zip using some
command line tools, right? Oh, me poor GUI user… :wink: Which one should
I use to extract the archive?

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

scp -r your-project [email protected]:

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
problems.

Ben

On Sep 16, 2006, at 7:14 AM, Joshua M. wrote:

Oh, me poor GUI user… :wink: Which one should
I use to extract the archive?

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

  2. Then use SFTP to send the file to your hoster:
    sftp myhoster.com
    (log in)
    put myrorapp.tgz
    exit

  3. 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
[email protected]

Thanks a lot, guys.

Ben B. wrote:

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

scp -r your-project [email protected]:

This sounds great, but it doesn’t seem to work for me… It just does
nothing, not even displaying an error or so… ?