Skip to content

Instantly share code, notes, and snippets.

@mikz
Created April 2, 2012 13:59
Show Gist options
  • Save mikz/2283638 to your computer and use it in GitHub Desktop.
Save mikz/2283638 to your computer and use it in GitHub Desktop.
unicorn config
preload_app true
worker_processes 2
listen 3000
before_fork do |server, worker|
ActiveRecord::Base.connection.disconnect!
end
after_fork do |server, worker|
ActiveRecord::Base.establish_connection
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment