Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7070579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:35:01+00:00 2026-05-28T05:35:01+00:00

I am not sure where exactly the problem is located but Capistrano takes about

  • 0

I am not sure where exactly the problem is located but Capistrano takes about 5 minutes to deploy an almost empty project.

Can you tell me if I am doing something wrong or is it usual?

I am using:

  • Capistrano 2.9.0
  • Rails 3.1.3
  • Github Repository
  • not too slow server (4 cores, 1 GB memory)
  • ngix, passenger

Here is the output I am getting:
https://gist.github.com/1632009

Capfile

load 'deploy' if respond_to?(:namespace) # cap2 differentiator
# Uncomment if you are using Rails' asset pipeline
load 'deploy/assets'
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks

deploy.rb

# -*- encoding : utf-8 -*-
require "bundler/capistrano"

set :user, 'rubys'
set :domain, 'example.com'
set :application, 'EXAMPLE'

# adjust if you are using RVM, remove if you are not
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require "rvm/capistrano"
set :rvm_ruby_string, '1.9.2'
#set :rvm_type, :user

# file paths
set :repository,  "git@github.com:GITHUBREPO/ashop.git"
set :deploy_to, "/apps/#{application}"

# using a local git repository on the server you are deploying to.
set :deploy_via, :remote_cache
set :copy_exclude, [ '.git' ]


# distribute your applications across servers (the instructions below put them
# all on the same server, defined above as 'domain', adjust as necessary)
role :app, domain
role :web, domain
role :db, domain, :primary => true


set :deploy_via, :remote_cache
set :scm, 'git'
set :branch, 'master'
set :scm_verbose, false
set :use_sudo, false
set :rails_env, :production

namespace :deploy do
  desc "cause Passenger to initiate a restart"
  task :restart do
    run "touch #{current_path}/tmp/restart.txt"
  end
end

EDIT

  • Networkspeed workplace:
    http://www.speedtest.net/result/1714391142.png
  • Speed Github – Server: ~ 300KiB
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:35:02+00:00Added an answer on May 28, 2026 at 5:35 am

    Capistrano is probably slow for a bunch of reasons. One is that it opens a new remote shell to your server for every run in your deploy.rb file.

    This can be amended a bit by using ssh master channels, which will cause capistrano to actually reuse ssh connections, which means less network overhead.

    Here’s an article on ruby deployment that mentions ssh master channels: http://alexyoung.org/2011/05/17/deployment/

    Another reason is that it copies your entire codebase to a new directory for every deploy.

    This is not strictly necessary when using git, and github has a wonderful article on how to “fix” this: https://github.com/blog/470-deployment-script-spring-cleaning

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem that is common, but I am not quite sure exactly
This problem appears to be intermittent, but I am not sure why exactly. When
I'm not sure exactly where this is happening, but what I'm trying to do
I am fairly new to MVC but not sure exactly which Redirect... replaces the
Not sure what exactly is going on here, but seems like in .NET 1.1
Firstly, apologies for the vague title, but I'm not sure exactly what I'm asking
Hi I have a problem(not exactly problem, I have solved it, but it is
This is a fairly simple problem, I'm just not sure exactly how to approach
Not sure exactly how to word this question ... so edits are welcomed! Anyway
Not sure exactly what I need to do to make this work, so my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.