Browse files

Replacing Thin with Unicorn for better Heroku performance

  • Loading branch information...
1 parent bb9d3a6 commit 536f773b3dabbc9b1209831b5c92fdb1105c8432 @naleksi naleksi committed Feb 28, 2012
Showing with 12 additions and 10 deletions.
  1. +2 −2 Gemfile
  2. +7 −7 Gemfile.lock
  3. +1 −1 Procfile
  4. +2 −0 config/unicorn.rb
View
4 Gemfile
@@ -30,13 +30,13 @@ gem "rspec-rails", :groups => [ :development, :test ]
group :development do
gem "rails-erd"
gem "sqlite3"
- gem "thin"
+ gem 'unicorn'
end
group :production do
gem "newrelic_rpm"
gem "pg"
- gem "thin"
+ gem 'unicorn'
end
group :test do
View
14 Gemfile.lock
@@ -50,15 +50,13 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.2.0)
- daemons (1.1.6)
database_cleaner (0.7.1)
devise (1.5.3)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.1)
diff-lcs (1.1.3)
erubis (2.7.0)
- eventmachine (0.12.10)
execjs (1.2.13)
multi_json (~> 1.0)
factory_girl (2.3.2)
@@ -88,6 +86,7 @@ GEM
railties (~> 3.0)
thor (~> 0.14)
json (1.6.5)
+ kgio (2.7.2)
libv8 (3.3.10.4)
mail (2.3.0)
i18n (>= 0.4.0)
@@ -144,6 +143,7 @@ GEM
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
+ raindrops (0.8.0)
rake (0.9.2.2)
rb-fsevent (0.4.3.1)
rdoc (3.12)
@@ -191,10 +191,6 @@ GEM
state_machine (1.1.1)
therubyracer (0.9.10)
libv8 (~> 3.3.10)
- thin (1.3.1)
- daemons (>= 1.0.9)
- eventmachine (>= 0.12.6)
- rack (>= 1.0.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
@@ -206,6 +202,10 @@ GEM
uglifier (1.2.2)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
+ unicorn (4.2.0)
+ kgio (~> 2.6)
+ rack
+ raindrops (~> 0.7)
warden (1.1.0)
rack (>= 1.0)
xpath (0.1.4)
@@ -243,6 +243,6 @@ DEPENDENCIES
sqlite3
state_machine
therubyracer
- thin
turn (~> 0.8.3)
uglifier (>= 1.0.3)
+ unicorn
View
2 Procfile
@@ -1 +1 @@
-web: bundle exec rails server thin -p $PORT
+web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
View
2 config/unicorn.rb
@@ -0,0 +1,2 @@
+worker_processes 4 # amount of unicorn workers to spin up
+timeout 30 # restarts workers that hang for 30 seconds

0 comments on commit 536f773

Please sign in to comment.