ちょっとした気まぐれでUnicornを使ってみた。 初Unicorn。 ということでUnicorn用のCapistranoのタスクをdeploy.rbに書いた。 内容はだいたい以下の受け売り。 Capistrano tasks for starting unicorn — Gist Twiwt:Blog / jugyo : Capistrano によるデプロイ時に Unicorn の再起動に失敗することがある問題への対処 namespace :deploy do task :start, :roles => :app, :except => { :no_release => true } do run "cd #{current_path} && BUNDLE_GEMFILE=#{current_path}/Gemfile bundle exec unicorn_rails -c #{cu
I have a basic Rails 3 app working locally on my development box, but want to test out deploying early on to make sure everything works. I'm using Capistrano to deploy. When I run cap deploy (after all the other necessary setup), it breaks on this command with this error: [...] * executing 'bundle:install' * executing "bundle install --gemfile /var/www/trex/releases/20100917172521/Gemfile --path /
新さくらのVPSへの引越しメモ vol.3 GitLab + Unicorn + Nginxの導入 vol.3 目次 依存モジュールの導入 システム管理ユーザ作成 Nginx GitLab用Ruby(rbenv + ruby-build) Gitolite GitLab Unicorn いよいよGitLab環境を構築していきます! 依存モジュールの導入 GitLabやRubyで必要になるモジュールを導入します。 ひとおもいに全部一行で入れてもらっても構いません。 zlib-devel %sudo yum -y install zlib-devel openssl-devel %sudo yum -y install openssl-devel mysql-devel %sudo yum -y install mysql-devel libxml2-devel %sudo yum -y in
方針 手元(Ubuntu)で開発して、サーバ(Ubuntu)にデプロイ出来るrails 3.1動作環境を作るのが目標 プロジェクト毎にユーザを作成する (各ライブラリをプロジェクト毎にbundlerで管理、デプロイをするため) 同様の理由でrbenvを使って各ユーザ毎にrubyのバージョンを管理 構成 静的なファイルへのリクエストは直接nginxで返す構成をとります(railsのpublic配下のディレクトリにあるファイル、適宜nginxのconfigに設定を追加する必要あり)。またrails3.1からAsset Pipelineが導入されたため/assets/〜に関するリクエストに関してもnginxで直接返すようにします。加えてnginx <=> unicorn間の接続にはUnix Domain Socketを用います。イメージを図にすると下記のようになります。 unicorn gith
どうやらUnicornというのが良いらしいという噂を聞きつけたので、どんなもんじゃろと試してみることにした。 Route 477 - 大規模Railsサイトのための新しいHTTPサーバ、Unicorn Unicornてのは何者なのかと言うと、Rack及びRailsに対応したRubyのWebアプリ用のHTTPサーバ。詳しくは上の記事を読んで下さい。githubでも使ってるそうだ。あと、名前が格好良い(あんまり関係ない)。 まずはunicornの設定 と言っても、gem install unicornしてconfig.ruがあるディレクトリでunicornコマンドを叩けば、thinとかと同じようにサーバが起動する。rackup互換のオプションも付いてるので特に悩むこともないと思う。あとは普通にApacheとかでプロキシの設定してやるなりなんなりすればすぐ使える。 それだけだと大して面白くないの
Unicorn is an interesting Unix Ruby HTTP server which makes great use of Unix: Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels. In this post I’ll describe Unicorn’s design then walk you through setting it up. Unicorn’s design Unicorn follows the Unix philosophy: D
unicorn, memoメモ。 http://annex-forkwell.heroku.com/2012/04/12/server_failure なぜ Forkwell はリリース初日にサーバダウンを繰り返したのか希望が見えたのは、Webサーバの1台目を Passenger に入れ替えたとき。 Unicorn 環境では Load Average がすぐに5とかに上がってどうしようもなかったWebサーバが、Load Average 0.1〜0.2 付近に収まり、しかもそのサーバに振られたリクエストでは一切500エラーが発生しなかったのです。 http://togetter.com/li/266521 http://blog.livedoor.jp/faulist/archives/1782956.html まず、Unicornのworkerは1プロセスにつき1度に1リクエストしか処理し
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く