Hmm. That doesn't seem right. Which version of Capistrano are you using?
- Jamis
On Thu, Aug 28, 2008 at 1:03 PM, francois.beausoleil
<[EMAIL PROTECTED]> wrote:
>
> The timeout happens while the run is working, not outside. The file
> I'm extracting is 2.5 Gb compressed, 30Gb decompressed.
>
> On 28 août, 14:59, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
>> Actually, you'd probably want to put the teardown at the very end of
>> the task, so that tasks run after latest_physical will have to force a
>> reconnect. Maybe I misunderstood though--is the timeout happening on
>> the second run()? If so, then yes, you'd put the teardown between the
>> two runs.
>>
>> - Jamis
>>
>> On Thu, Aug 28, 2008 at 12:52 PM, francois.beausoleil
>>
>> <[EMAIL PROTECTED]> wrote:
>>
>> > Thanks Jamis. I read the thread you mentioned. What you are advising
>> > is to change this code:
>>
>> > desc "Restores the latest binary dump"
>> > task :latest_physical, :roles => %w(slave) do
>> > run "cd /tmp/restore && clis3 get #{backup} | tar xzv"
>> > run "rm -rfv /var/lib/mysql/* && cp -rv /tmp/restore/backup/* /var/
>> > lib/mysql && rm -f /var/lib/mysql/*.pid"
>> > end
>>
>> > Into this:
>> > desc "Restores the latest binary dump"
>> > task :latest_physical, :roles => %w(slave) do
>> > teardown_connections_to(sessions.keys)
>> > run "cd /tmp/restore && clis3 get #{backup} | tar xzv"
>> > teardown_connections_to(sessions.keys)
>> > run "rm -rfv /var/lib/mysql/* && cp -rv /tmp/restore/backup/* /var/
>> > lib/mysql && rm -f /var/lib/mysql/*.pid"
>> > end
>>
>> > I haven't tried it yet, just want to confirm I'm reading things
>> > correctly.
>>
>> > Thanks!
>> > François
>>
>> > On 28 août, 13:51, Jamis Buck <[EMAIL PROTECTED]> wrote:
>> >> It's not necessarily a server configuration issue. See this thread for
>> >> a discussion of this same issue, with a workaround:
>>
>> >>http://groups.google.com/group/capistrano/browse_thread/thread/a919f2...
>>
>> >> (or, if that long URL gets truncated, here's a
>> >> tinyurl:http://tinyurl.com/67w7py)
>>
>> >> - Jamis
>>
>> >> On Aug 28, 2008, at 11:42 AM, francois.beausoleil wrote:
>>
>> >> > I know it's a configuration issue on my server, but I can't find what
>> >> > to change... I receive the following backtrace regularly:
>>
>> >> > /Library/Ruby/Gems/1.8/gems/net-ssh-2.0.2/lib/net/ssh/buffered_io.rb:
>> >> > 64:in `recv': Connection reset by peer - recvfrom(2)
>> >> > (Errno::ECONNRESET)
>> >> > from /Library/Ruby/Gems/1.8/gems/net-ssh-2.0.2/lib/net/ssh/
>> >> > buffered_io.rb:64:in `fill'
>> >> > from /Library/Ruby/Gems/1.8/gems/net-ssh-2.0.2/lib/net/ssh/
>> >> > connection/
>> >> > session.rb:200:in `postprocess'
>> >> > from /Library/Ruby/Gems/1.8/gems/net-ssh-2.0.2/lib/net/ssh/
>> >> > connection/
>> >> > session.rb:196:in `each'
>> >> > from /Library/Ruby/Gems/1.8/gems/net-ssh-2.0.2/lib/net/ssh/
>> >> > connection/
>> >> > session.rb:196:in `postprocess'
>> >> > from /Library/Ruby/Gems/1.8/gems/capistrano-2.4.3/lib/capistrano/
>> >> > processable.rb:31:in `process_iteration'
>> >> > from /Library/Ruby/Gems/1.8/gems/capistrano-2.4.3/lib/capistrano/
>> >> > processable.rb:43:in `ensure_each_session'
>> >> > from /Library/Ruby/Gems/1.8/gems/capistrano-2.4.3/lib/capistrano/
>> >> > processable.rb:41:in `each'
>> >> > from /Library/Ruby/Gems/1.8/gems/capistrano-2.4.3/lib/capistrano/
>> >> > processable.rb:41:in `ensure_each_session'
>> >> > ... 25 levels...
>> >> > from /Library/Ruby/Gems/1.8/gems/capistrano-2.4.3/lib/capistrano/cli/
>> >> > execute.rb:14:in `execute'
>> >> > from /Library/Ruby/Gems/1.8/gems/capistrano-2.4.3/bin/cap:4
>> >> > from /usr/bin/cap:19:in `load'
>> >> > from /usr/bin/cap:19
>>
>> >> > This happens while running commands remotely that take a "long" time
>> >> > to execute. Something on the order of minutes (restoring backups or
>> >> > filling an EC2 volume for example). This is on Ubuntu Hardy 8.04
>> >> > using OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007.
>>
>> >> > I did check man sshd_config, but couldn't find a timeout option I
>> >> > could identify. I found this thread
>> >> >http://www.wideopen.com/archives/redhat-list/2001-April/msg01778.html
>> >> > on the RedHat mailing list, but it doesn't have a response. This
>> >> > seemed
>> >> > promising:http://johnsonsolutions.blogspot.com/2008/02/config-idle-timeout-for-...
>> >> > ,
>> >> > alas, the OpenSSH version above didn't recognize the IdleTimeout
>> >> > option. And the OpenSSH general mailing list didn't turn up anything
>> >> > relevant on a search for "timeout".
>>
>> >> > BTW, I do get kicked out of the machine regularly when I simply SSH
>> >> > into the box and run the same commands, so this is nothing Capistrano-
>> >> > specific.
>>
>> >> > Any help would be *very* appreciated!
>>
>> >> > Thanks!
>> >> > François
>>
>> >> smime.p7s
>> >> 3KAfficherTélécharger
> >
>
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---