eBooru/config.ru
Earlopain fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00

19 lines
504 B
Ruby

# frozen_string_literal: true
# This file is used by Rack-based servers to start the application.
if defined?(Unicorn) && ENV["RAILS_ENV"] == "production"
# Unicorn self-process killer
require 'unicorn/worker_killer'
# Max requests per worker
use Unicorn::WorkerKiller::MaxRequests, 5_000, 10_000
# Max memory size (RSS) per worker
use Unicorn::WorkerKiller::Oom, (386*(1024**2)), (768*(1024**2))
end
require ::File.expand_path('../config/environment', __FILE__)
run Rails.application