Created
September 19, 2013 13:51
-
-
Save halidaltuner/6623794 to your computer and use it in GitHub Desktop.
unicorn example conf for redmine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 4 | |
working_directory "/usr/local/share/redmine" | |
listen "/usr/local/share/redmine/tmp/pids/.unicorn.sock", :backlog => 64 | |
listen 8080, :tcp_nopush => true | |
timeout 30 | |
pid "/usr/local/share/redmine/tmp/pids/unicorn.pid" | |
stderr_path "/usr/local/share/redmine/log/unicorn.stderr.log" | |
stdout_path "/usr/local/share/redmine/log/unicorn.stdout.log" | |
preload_app true | |
GC.respond_to?(:copy_on_write_friendly=) and | |
GC.copy_on_write_friendly = true | |
check_client_connection false | |
before_fork do |server, worker| | |
defined?(ActiveRecord::Base) and | |
ActiveRecord::Base.connection.disconnect! | |
end | |
after_fork do |server, worker| | |
defined?(ActiveRecord::Base) and | |
ActiveRecord::Base.establish_connection | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment