Sha256: 9fa68e48cbfffefc3f5117379f4c073703830b787ef3117df2cfcf7d8cafa5fe
Contents?: true
Size: 1.14 KB
Versions: 6
Compression:
Stored size: 1.14 KB
Contents
worker_processes 5 working_directory "/path/to/your/project/current" # This loads the application in the master process before forking # worker processes # Read more about it here: # http://unicorn.bogomips.org/Unicorn/Configurator.html preload_app true timeout 30 # This is where we specify the socket. # We will point the upstream Nginx module to this socket later on listen "/path/to/your/project/shared/sockets/unicorn.sock", :backlog => 64 pid "/path/to/your/project/current/shared/pids/unicorn.pid" # Set the path of the log files inside the log folder of the testapp stderr_path "/path/to/your/project/current/log/unicorn.stderr.log" stdout_path "/path/to/your/project/current/log/unicorn.stdout.log" before_fork do |server, worker| # This option works in together with preload_app true setting # What is does is prevent the master process from holding # the database connection defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect! end after_fork do |server, worker| # Here we are establishing the connection after forking worker # processes defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection end
Version data entries
6 entries across 6 versions & 1 rubygems