Skip to content

Instantly share code, notes, and snippets.

@simonc
Last active December 9, 2015 17:58
Show Gist options
  • Select an option

  • Save simonc/4306730 to your computer and use it in GitHub Desktop.

Select an option

Save simonc/4306730 to your computer and use it in GitHub Desktop.
Unicorn on heroku
group :production do
gem 'unicorn'
end
web: bundle exec unicorn_rails -p $PORT -c ./config/unicorn.rb
# If you have a very small app you may be able to
# increase this, but in general 3 workers seems to
# work best
worker_processes 3
# Load your app into the master before forking
# workers for super-fast worker spawn times
preload_app true
# Immediately restart any workers that
# haven't responded within 30 seconds
timeout 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment