forked from e621ng/e621ng
Update unicorn settings
This commit is contained in:
parent
0102e4239b
commit
c729a4d641
@ -1,8 +1,6 @@
|
||||
# This file is used by Rack-based servers to start the application.
|
||||
|
||||
require ::File.expand_path('../config/environment', __FILE__)
|
||||
|
||||
if defined?(Unicorn) && Rails.env.production?
|
||||
if defined?(Unicorn) && ENV["RAILS_ENV"] == "production"
|
||||
# Unicorn self-process killer
|
||||
require 'unicorn/worker_killer'
|
||||
|
||||
@ -10,7 +8,9 @@ if defined?(Unicorn) && Rails.env.production?
|
||||
use Unicorn::WorkerKiller::MaxRequests, 5_000, 10_000
|
||||
|
||||
# Max memory size (RSS) per worker
|
||||
#use Unicorn::WorkerKiller::Oom, (192*(1024**2)), (256*(1024**2))
|
||||
use Unicorn::WorkerKiller::Oom, (192*(1024**2)), (256*(1024**2))
|
||||
end
|
||||
|
||||
require ::File.expand_path('../config/environment', __FILE__)
|
||||
|
||||
run Rails.application
|
||||
|
@ -48,7 +48,7 @@ Rails.application.configure do
|
||||
|
||||
# Use the lowest log level to ensure availability of diagnostic information
|
||||
# when problems arise.
|
||||
config.log_level = :debug
|
||||
config.log_level = :info
|
||||
|
||||
# Prepend all log lines with the following tags.
|
||||
config.log_tags = [ :request_id ]
|
||||
|
@ -1,20 +1,20 @@
|
||||
# Set your full path to application.
|
||||
app_path = "/var/www/danbooru/current"
|
||||
app_path = "/home/e621/e621ng"
|
||||
|
||||
# Set unicorn options
|
||||
worker_processes 10
|
||||
worker_processes 15
|
||||
|
||||
timeout 180
|
||||
#listen "127.0.0.1:9000", :tcp_nopush => true
|
||||
listen "/tmp/.unicorn.sock", :backlog => 512
|
||||
listen "#{app_path}/tmp/.unicorn.sock", :backlog => 512
|
||||
|
||||
# Spawn unicorn master worker for user apps (group: apps)
|
||||
user 'danbooru', 'danbooru'
|
||||
user 'e621', 'e621'
|
||||
|
||||
# Fill path to your app
|
||||
working_directory app_path
|
||||
|
||||
# Should be 'production' by default, otherwise use other env
|
||||
# Should be 'production' by default, otherwise use other env
|
||||
rails_env = ENV['RAILS_ENV'] || 'production'
|
||||
|
||||
# Log everything to one file
|
||||
|
Loading…
Reference in New Issue
Block a user