Capistrano seemingly freezes on deploy (used to work fine)

755 views
Skip to first unread message

antum

unread,
Dec 17, 2009, 8:56:47 PM12/17/09
to Capistrano
Hi there,

I'm trying to deploy a PHP application from SubVersion source control
to a single server. The recipe hasn't changed and it used to work
fine, but now it stops after doing a svn checkout and doesn't budge
for hours until I press Cmd+C (I'm in Terminal, on a Mac)

See http://pastebin.ca/1718985 for my Terminal output. (You can see
where I press Cmd+C and it tries to rollback and produces a stack
trace)

I can see on the server that the new releases directory is created,
but the symlink remains unchanged. And my custom code to make paths
writeable has not been executed. As to what command is being processed
at the time it freezes? I don't know... can you help me find out?

My question is not "can you fix it for me" because I realize this is
probably a fairly uncommon situation but I'm not sure where to look or
how to start debugging this problem, or where to search for possible
logging entries.

I'm using Capistrano 2.5.10

And here is my very basic deploy.rb file: http://pastebin.ca/1719002

Please let me know if you have any ideas I might be able to try, or if
there is any other information that might help you come up with ideas.

Also is there anything that could change on the server that might be
interfering with this process?

Many thanks
Ant Brown

Lee Hambley

unread,
Dec 18, 2009, 4:37:28 AM12/18/09
to capis...@googlegroups.com
Ant, first thing that comes to mind is a repository problem; whenever people have problems – we usually recommend that they don't use :remote_cache for deploying, but it might work for you.

My suggestion, before you try that would be to manually go onto the server; crank up the log level and try a checkout from your repository. Also, check the boring things like SSH keepalives, and etc. Depending on configuration, if there's a checkout running for more than a few minutes, the openssh server will hang up on you.

How long does your checkout take?

-- Lee Hambley

Twitter: @leehambley | @capistranorb

Rafael G.

unread,
Dec 18, 2009, 10:59:42 AM12/18/09
to capis...@googlegroups.com
Hi Ant,

Could you try to add this line to your deploy.rb ?

default_run_options[:pty] = true

More info about this change:
:pty option - http://www.capify.org/index.php/Run#options

Regards

--
Rafa

antum

unread,
Dec 19, 2009, 4:55:26 AM12/19/09
to Capistrano
Hi Lee,

Many thanks for your reply, I've only just had a chance to sit down in
front of the computer. So...

Is remote_cache enabled by default? I don't have it set anywhere in my
deploy.rb

I just tried a checkout locally, it took 5 minutes, I tried the same
thing from the server and it's still going after 32 minutes...

So that appears to be the problem.

What log levels do you suggest I raise, and where can I find logs for
what's happening during a SubVersion checkout?

Although I truly appreciate the help I fear that this is a subversion
issue now... and I'll need to ask on a svn mailing list, my problem
is... I don't know where to start

Thanks again
Ant

antum

unread,
Dec 19, 2009, 4:57:08 AM12/19/09
to Capistrano
Hi Rafael,

Thanks for your help, I checked out the docs for the setting, and
tried it out but to no avail, see my reply to Lee for more
information.

Cheers
Ant

On Dec 19, 4:59 am, "Rafael G." <r...@aspgems.com> wrote:
> antum wrote:
> > Hi there,
>
> > I'm trying to deploy a PHP application from SubVersion source control
> > to a single server. The recipe hasn't changed and it used to work
> > fine, but now it stops after doing a svn checkout and doesn't budge
> > for hours until I press Cmd+C (I'm in Terminal, on a Mac)
>

> > Seehttp://pastebin.ca/1718985for my Terminal output. (You can see

Rory Gibson

unread,
Dec 19, 2009, 5:30:47 AM12/19/09
to capis...@googlegroups.com
If you've got SVN connection issues on the remote server, don't forget
that you can work around them by using the :copy strategy, which will
do a local checkout on the machine where ca is running, create a
tarball, ship it over and unack into the familiar releases/ & current/
directory structure.

See http://weblog.jamisbuck.org/2008/5/2/capistrano-2-3-0 for more info.

Rory

2009/12/19 antum <webc...@gmail.com>:

> --
> * You received this message because you are subscribed to the Google Groups "Capistrano" group.
> * To post to this group, send email to capis...@googlegroups.com
> * To unsubscribe from this group, send email to capistrano+...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
>

Robin Bowes

unread,
Dec 19, 2009, 6:16:27 AM12/19/09
to Capistrano
On 19/12/09 10:30, Rory Gibson wrote:
> If you've got SVN connection issues on the remote server, don't forget
> that you can work around them by using the :copy strategy, which will
> do a local checkout on the machine where ca is running, create a
> tarball, ship it over and unack into the familiar releases/ & current/
> directory structure.
>
> See http://weblog.jamisbuck.org/2008/5/2/capistrano-2-3-0 for more info.

Indeed, I would argue that this is a better approach and should be made
the default.

For example, it means that you don't have to have subversion installed
on your production servers, and only your deployment server needs access
to your subversion repository.

In fact, I don't personally see *any* benefit in deploying with :svn

R.

Lee Hambley

unread,
Dec 19, 2009, 5:33:40 PM12/19/09
to capis...@googlegroups.com
Robin,

Ask the people deploying 400Mb of application code and managing the same in assets across 50+ servers, they'll tell you why you don't want that bandwidth going upstream from your workstation,

Robin Bowes

unread,
Dec 19, 2009, 5:58:26 PM12/19/09
to Capistrano
On 19/12/09 22:33, Lee Hambley wrote:
> Robin,
>
> Ask the people deploying 400Mb of application code and managing the same
> in assets across 50+ servers, they'll tell you why you don't want that
> bandwidth going upstream from your workstation,

Lee,

Who says I'm running cap from my workstation? :)

That said, is it possible to stage the tarball somewhere and grab it
over http? That would be quite cool.

R.

antum

unread,
Dec 19, 2009, 9:19:53 PM12/19/09
to Capistrano
Rory,

What a wonderful idea, and thanks for the link... is there a page with
links to helpful articles like this for Capistrano?

In any case your suggestion worked perfectly- thankyou so much!

Cheers
Ant

On Dec 19, 11:30 pm, Rory Gibson <r...@deadcrow.net> wrote:
> If you've got SVN connection issues on the remote server, don't forget
> that you can work around them by using the :copy strategy, which will
> do a local checkout on the machine where ca is running, create a
> tarball, ship it over and unack into the familiar releases/ & current/
> directory structure.
>

> Seehttp://weblog.jamisbuck.org/2008/5/2/capistrano-2-3-0for more info.
>
> Rory
>
> 2009/12/19 antum <webch...@gmail.com>:

Rory Gibson

unread,
Dec 20, 2009, 5:13:39 AM12/20/09
to capis...@googlegroups.com
I'm actually working on a modified set of scripts to do a staged copy
right now.

In my case it's 200mb from a deployment and build machine to 3
destinations but that's quite bad enough!

If I can get the time I'll look into packaging this stuff as some new
recipes (staged copy, a slightly modified copy strategy and some stuff
for deployingvtomcat and servicemix apps)

Rory


On 19 Dec 2009, at 22:58, Robin Bowes <robin...@robinbowes.com>
wrote:

Reply all
Reply to author
Forward
0 new messages