LoginSignup
0
1

More than 5 years have passed since last update.

capistrano3でデプロイ時に「connection closed by remote host」エラーが発生する場合の対処法

Posted at

Problem

デプロイ対象のhost数が多い場合、capistranoでデプロイした時に以下のエラーが発生します

$ bundle exec cap production deploy
...
SSHKit::Runner::ExecuteError: Exception while executing on host xxx.xxx.xxx: connection closed by remote host

Solution

段階的にデプロイを実行するように、deploy.rbに以下のコードを追記します

# deploy.rb

module SSHKit
  class Coordinator
    private
      def default_options
        { in: :groups, limit: 5 }
      end
  end
end

...

参考

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1