logo       

Re: put hangs: msg#00145

lang.ruby.capistrano.general

Subject: Re: put hangs


Ok, I did some more tests.

put("1"*12105, '/tmp/tmpfile.txt')

works, and

put("1"*12106, '/tmp/tmpfile.txt')

does not work. So it looks like my threshold is about 12k. I don't
know what that means, or why it is happening. I'm running Ubuntu Gutsy
on the client side, and Ubuntu Dapper on the server side.


Paul

On Dec 19, 4:21 pm, Paul Stadig <p...-rIu1mJrGGVN7tPAFqOLdPg@xxxxxxxxxxxxxxxx>
wrote:
> Adding "set :synchronous_connect, true" fixed byputhang, but I also
> noticed that, for me,putwould only hang with "large" files. I kept
> repeatedly trying toputthe same file, and as I whittled it down it
> would finally go through. Maybe that will help someone debug. I didn't
> spend enough time to figure out exactly what the threshold is, because
> the :synchronous_connect option worked for me, but the full file I was
> trying to send was only 196k, so it's a low threshold what ever it is.
>
> Paul
>
> On Nov 13, 4:07 pm, Jamis Buck
> <ja...-uHoyYlH2B+GakBO8gow8eQ@xxxxxxxxxxxxxxxx> wrote:
>
> > You might try the following setting in deploy.rb:
>
> > set :synchronous_connect, true
>
> > Some have found that having cap try to connect to each server
> > synchronously (rather than in parallel, via threads) has helped with
> >puthanging.
>
> > - Jamis
>
> > On Nov 13, 2007, at 1:32 PM, Skorgu wrote:
>
> > > I realize this is an old thread, but there aren't any good solutions
> > > to this that I can find. I'm seeing identical behavior, also with
> > > Ubuntu on both ends and no gateway. I can replicate this trivially if
> > > anyone wants to poke at it.
>
> > > In the meantime, I'm backing down to the shell to transfer files:
>
> > > def put_file(file, role)
> > > for file_server in roles[*role]
> > > logger.info "Pushing #{file} to #{file_server}"
> > > %x[ scp #{file} #{file_server}:~/#{file}]
> > > end
> > > logger.info "#{file} pushed successfully"
> > > end
>
> > > Definitely dirty but it gets the job done. Hope this helps someone.
>
> > > On Sep 26, 1:40 pm, wolfmanjm
> > > <wolfma...-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx> wrote:
> > >> No gateway, everything in my capfile is shown. This is very
> > >> repeatable, so if I get time I'll try to figure it out. I can give a
> > >> you a trace of where it is hung when I hit ctrl c if that helps.
>
> > >> The funny thing is I used this all the time in cap1 and never had
> > >> this
> > >> problem before!
>
> > >> On Sep 26, 2:28 am, Jamis Buck
> > >> <ja...-uHoyYlH2B+GakBO8gow8eQ@xxxxxxxxxxxxxxxx> wrote:
>
> > >>> Yucky. You're being bit by the infamous hanging-putbug. Are you
> > >>> using a gateway? If so, that's the problem, and there's not really a
> > >>> workaround except to NOT use a gateway withput. If you aren't using
> > >>> a gateway, then you're one of the lucky few who have encountered
> > >>> this
> > >>> one. I've never been able to duplicate this except with a gateway.
>
> > >>> I'm very hopeful that the rewrite of Net::SSH and Net::SFTP will fix
> > >>> this...but that's still a few weeks off, at best. I'm afraid I
> > >>> haven't got any better news for you. :( If you happen to find a
> > >>> workaround, please do post it here.
>
> > >>> - Jamis
>
> > >>> P.S. And yeah, the lack of documentation *is* disturbing. I'll
> > >>> get to
> > >>> it as soon as I can.
>
> > >>> On Sep 26, 2007, at 12:32 AM, wolfmanjm wrote:
>
> > >>>> Hi, I'm just starting to use cap2 (after using cap1 for years).
>
> > >>>> I have a really really simple capfile...
>
> > >>>> ssh_options[:port] = 11345
>
> > >>>> task :deploy_mystuff, :hosts => "myhost.com" do
> > >>>> now= "#{Time.now.utc.strftime("%Y%m%d%H%M%S")}"
>
> > >>>> put(File.read("app..war"), "app.war.#{now}")
>
> > >>>> run <<-CMD
> > >>>> mv deploy/app.war app.war.old.#{now} &&
> > >>>> cp "app.war.#{now} deploy/app_war"
> > >>>> CMD
>
> > >>>> end
>
> > >>>> Theputhangsbefore sending any bytes, on the host the file is
> > >>>> created ok, but has zero length.
>
> > >>>> (ssh and scp work fine, my host is ubuntu fiesty and the server is
> > >>>> ubuntu dapper).
>
> > >>>> Any ideas?
>
> > >>>> (BTW I presumeputis supported in cap2, the lack of
> > >>>> documentation is
> > >>>> quite disturbing :)
>
> > >>> smime.p7s
> > >>> 3KDownload
>
> > smime.p7s
> > 3KDownload


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise