mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 06:23:39 +08:00
adjust timeouts in dev
This commit is contained in:
parent
b8667c77c4
commit
1172e141cd
|
@ -15,9 +15,6 @@ working_directory discourse_path
|
|||
# listen "#{discourse_path}/tmp/sockets/unicorn.sock"
|
||||
listen (ENV["UNICORN_PORT"] || 3000).to_i
|
||||
|
||||
# nuke workers after 30 seconds instead of 60 seconds (the default)
|
||||
timeout 30
|
||||
|
||||
if !File.exist?("#{discourse_path}/tmp/pids")
|
||||
FileUtils.mkdir_p("#{discourse_path}/tmp/pids")
|
||||
end
|
||||
|
@ -27,12 +24,16 @@ pid (ENV["UNICORN_PID_PATH"] || "#{discourse_path}/tmp/pids/unicorn.pid")
|
|||
|
||||
if ENV["RAILS_ENV"] == "development" || !ENV["RAILS_ENV"]
|
||||
logger Logger.new($stdout)
|
||||
# we want a longer timeout in dev cause first request can be really slow
|
||||
timeout 60
|
||||
else
|
||||
# By default, the Unicorn logger will write to stderr.
|
||||
# Additionally, some applications/frameworks log to stderr or stdout,
|
||||
# so prevent them from going to /dev/null when daemonized here:
|
||||
stderr_path "#{discourse_path}/log/unicorn.stderr.log"
|
||||
stdout_path "#{discourse_path}/log/unicorn.stdout.log"
|
||||
# nuke workers after 30 seconds instead of 60 seconds (the default)
|
||||
timeout 30
|
||||
end
|
||||
|
||||
# important for Ruby 2.0
|
||||
|
|
Loading…
Reference in New Issue
Block a user