scttnlsn / dandelion

Incremental Git repository deployment.
http://scttnlsn.github.io/dandelion
MIT License
738 stars 60 forks source link

SFTP extremely slow #85

Closed theDanielJLewis closed 10 years ago

theDanielJLewis commented 10 years ago

Whether I run dandelion deploy or dandelion status, the command takes at least two minutes before it displays any results.

I'm on OS X Mavericks with Ruby 2.0, SourceTree handling Git, and running Dandelion 0.4.6 from Terminal.

I'm connecting to my remove server via SFTP on an alternative port. I tried with and without passive enabled.

Here's my .yml file:

adapter: sftp
host: REDACTED
username: REDACTED
password: REDACTED
port: REDACTED
path: wp-content/plugins/REDACTED

exclude:
    - .gitignore
    - dandelion.yml
scttnlsn commented 10 years ago

@DanielJLewis Could you try running dandelion -h? Does that take just as long?

theDanielJLewis commented 10 years ago

dandelion -h is nearly instant.

My web host is Synthesis, if that makes any difference.

scttnlsn commented 10 years ago

Sounds like a connection issue. Have you tried connecting to your web host using a different FTP/SFTP client?

theDanielJLewis commented 10 years ago

Yes. SFTP clients have no problem connecting instantly.

scttnlsn commented 10 years ago

Do you have another host you could test with as well? Curious if it's any faster.

theDanielJLewis commented 10 years ago

I do also have a standard BlueHost account. I tried it with FTP and it was instant. But when I switched the adapter to SFTP with BlueHost, Dandelion slowed down again. It took more than 2 minutes before it returned an expected error (since I don't think SFTP works with that host).

So I suspect there's something wrong with SFTP.

In error messages, I see /Library/Ruby/Gems/2.0.0/gems/net-sftp-2.1.2/. Does anything look strange or outdated about that to you? Should I be on Ruby 2.1? Or should net-sftp be a higher version?

scttnlsn commented 10 years ago

Okay, good to know- thanks! I'll have to do some research here.

It looks like you're using the version of Ruby that comes bundled w/ OSX Mavericks. Trying a different Ruby version would definitely be helpful in debugging this if you're able to do so.

theDanielJLewis commented 10 years ago

Bingo! It must've been something with my Ruby version that came with Mavericks.

I used RVM to install Ruby 2.1.1, re-installed Dandelion and net-sftp, then tried my Dandelion again and it was instantaneous!

Thanks for helping me with this. Problem solved!

scttnlsn commented 10 years ago

@DanielJLewis Great!