Ahh if its a thread problem then it probably exhibits more on dual processor machines, and I was using a single processor machine before when I used this recipe, and now I'm using dual processor.
Thanks On Sep 26, 11:57 am, Jamis Buck <[EMAIL PROTECTED]> wrote: > Yeah, I remembered that setting after I replied to your email. It's a > hack, but it works. It is something to do with threads, which is why > I'm hopeful the new Net::SSH will fix it (since the new Net::SSH > doesn't use threads to poll). > > - Jamis > > On Sep 26, 2007, at 12:43 PM, wolfmanjm wrote: > > > > > Hey Jamis, that worked for my hanging put problem! doesn't hang > > anymore. > > > On Sep 26, 9:24 am, Jamis Buck <[EMAIL PROTECTED]> wrote: > >> Yeah, I strongly suspect you're being bitten by a put bug, which I've > >> never been able to duplicate, but which I strong suspect is related > >> to some bad design decisions in Net::SSH and Net::SFTP. I'm very > >> hopeful that the new Net::SSH and Net::SFTP rewrites will help > >> this...but that doesn't help you right now. > > >> What if you do this at the top of your deploy.rb: > > >> set :synchronous_connect, true > > >> That flag was added to help some people who reported the upload- > >> hanging issue, and it seemed to work in some cases. > > >> - Jamis > > >> On Sep 26, 2007, at 10:16 AM, Jon Rosebaugh wrote: > > >>> On 9/26/07, Jamis Buck <[EMAIL PROTECTED]> wrote: > >>>> I suspect you're being bitten by the "put bug" (which is really > >>>> a bug > >>>> in Net::SSH somewhere). Do you have a gateway configured in your > >>>> cap > >>>> recipes anywhere? > > >>> Nope, here is our complete cap setup, with urls altered for privacy: > > >>> I deploy by running cap <target> deploy. e.g., "cap public > >>> deploy" for > >>> public server, which is where we're having the problem. > > >>> Capfile: > >>> load 'deploy' if respond_to?(:namespace) # cap2 differentiator > >>> require 'lib/extensions/mongrel_recipes' > >>> load 'config/deploy' > > >>> config/deploy.rb: > >>> set :application, "nexus" > >>> set :repository, "http://svn/project_repository/branches/0.5" > >>> set :deploy_via, :checkout > >>> set :user, "deploy" > >>> set(:mongrel_conf) { "#{current_path}/config/mongrel_cluster.yml" } > >>> set(:deploy_to) { "/u/apps/#{application}"} > > >>> task :build do > >>> role :web, "buildserver" > >>> role :app, "buildserver" > >>> role :db, "buildserver" > >>> set :application, "nexus_build" > >>> set :repository, "http://svn/project_repository/trunk/" > >>> set :mongrel_conf, "#{current_path}/config/ > >>> mongrel_build_cluster.yml" > >>> end > > >>> task :mirror do # this one is an exact copy of the public server > >>> role :web, "buildmirror" > >>> role :app, "buildmirror" > >>> role :db, "buildmirror" > >>> end > > >>> task :public do > >>> role :web, "publicserver.outsideourfirewall.com" > >>> role :app, "publicserver.outsideourfirewall.com" > >>> role :db, "publicserver.outsideourfirewall.com" > >>> set :deploy_via, :copy > >>> set :copy_strategy, :checkout > >>> set :copy_compression, :zip > >>> end > > >>> namespace :deploy do > >>> task :migrate do > >>> # this is deliberately empty, since we don't do migrations. > >>> end > > >>> end > > >>> lib/extensions/mongrel_recipes..rb: > >>> Capistrano::Configuration.instance(:must_exist).load do > >>> depend :remote, :gem, "mongrel_cluster", ">=0.2.1" > >>> after "deploy:setup", "mongrel:cluster:setup" > > >>> set(:mongrel_servers, 3) > >>> set(:mongrel_port) { abort 'Please configure the mongrel_port > >>> variable before deploying' } > >>> set(:mongrel_address, "127.0.0.1") > >>> set(:mongrel_environment, "production") > >>> set(:mongrel_user) { user } > >>> set(:mongrel_group) { user } > >>> set(:mongrel_prefix, nil) > >>> set(:mongrel_num_procs, 3) > >>> set(:mongrel_conf) { File.join(shared_path, 'config', > >>> 'mongrel_cluster.yml') } > >>> set(:mongrel_startup_file) { File.join('/etc', 'mongrel_cluster', > >>> "#{application}.yml") } > > >>> namespace :mongrel do > >>> namespace :cluster do > >>> desc <<-DESC > >>> Configure Mongrel processes on the app server. This uses > >>> the :use_sudo > >>> variable to determine whether to use sudo or not. By > >>> default, :use_sudo is > >>> set to true. > >>> DESC > >>> task :setup, :roles => :app do > >>> argv = [] > >>> argv << "mongrel_rails cluster::configure" > >>> argv << "-N #{mongrel_servers.to_s}" > >>> argv << "-p #{mongrel_port.to_s}" > >>> argv << "-e #{mongrel_environment}" > >>> argv << "-a #{mongrel_address}" > >>> argv << "-c #{current_path}" > >>> argv << "-C #{mongrel_conf}" > >>> argv << "-n #{mongrel_num_procs}" > >>> argv << "--user #{mongrel_user}" if mongrel_user > >>> argv << "--group #{mongrel_group}" if mongrel_group > >>> argv << "--prefix #{mongrel_prefix}" if mongrel_prefix > >>> cmd = argv.join " " > >>> # Try to create shared/config > >>> sudo "mkdir -p #{File.dirname(mongrel_conf)}" > >>> # sudo the command to generate a shared/config/ > >>> mongrel_cluster.yml > >>> sudo cmd > >>> # Try to create /etc/mongrel_cluster > >>> sudo "mkdir -p #{File.dirname(mongrel_startup_file)}" > >>> sudo <<-CMD > >>> if [ ! -e #{mongrel_startup_file} ] ; then > >>> ln -s #{mongrel_conf} #{mongrel_startup_file} ; > >>> fi > >>> CMD > >>> end > > >>> desc <<-DESC > >>> Start Mongrel processes on the app server. This uses the > >>> :use_sudo variable to determine whether to use sudo or not. By > >>> default, :use_sudo is > >>> set to true. > >>> DESC > >>> task :start, :roles => :app do > >>> sudo "mongrel_rails cluster::start -C #{mongrel_conf}" > >>> end > > >>> desc <<-DESC > >>> Restart the Mongrel processes on the app server by starting > >>> and > >>> stopping the cluster. This uses the :use_sudo > >>> variable to determine whether to use sudo or not. By default, > >>> :use_sudo is set to true. > >>> DESC > >>> task :restart, :roles => :app do > >>> sudo "mongrel_rails cluster::restart -C #{mongrel_conf}" > >>> end > > >>> desc <<-DESC > >>> Stop the Mongrel processes on the app server. This uses > >>> the :use_sudo > >>> variable to determine whether to use sudo or not. By > >>> default, :use_sudo is > >>> set to true. > >>> DESC > >>> task :stop, :roles => :app do > >>> sudo "mongrel_rails cluster::stop -f -C #{mongrel_conf}" > >>> end > > >>> desc <<-DESC > >>> Apply a new Mongrel configuration. > >>> DESC > >>> task :reset_config, :roles => :app do > >>> mongrel.cluster.stop > >>> sudo "rm -f #{mongrel_conf}" > >>> mongrel.cluster.setup > >>> mongrel.cluster.start > >>> end > >>> end > >>> end > > >>> # Override standard deploy. > >>> namespace :deploy do > >>> desc <<-DESC > >>> Start the Mongrel processes on the app server by calling > >>> mongrel:cluster:start > >>> DESC > >>> task :start, :roles => :app do > >>> mongrel.cluster.start > >>> end > > >>> desc <<-DESC > >>> Restart the Mongrel processes on the app server by calling > >>> mongrel:cluster:restart > >>> DESC > >>> task :restart, :roles => :app do > >>> mongrel.cluster.restart > >>> end > > >>> desc <<-DESC > >>> Stop the Mongrel processes on the app server by calling > >>> mongrel:cluster:stop > >>> DESC > >>> task :stop, :roles => :app do > >>> mongrel.cluster.stop > >>> end > >>> end > >>> end > > >> smime.p7s > >> 3KDownload > > > > > > > smime.p7s > 3KDownload --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
