Skip to content
Permalink
Browse files

update puma

  • Loading branch information
sizief committed Dec 29, 2019
1 parent 76ed241 commit a679342514018f9136c76e50cddd08b5bd60c318
Showing with 5 additions and 2 deletions.
  1. +3 −0 .env.example
  2. +2 −2 config/puma.rb
@@ -25,6 +25,9 @@ SSH_USER=
#Telegram Bot Id for monitoring
TELEGRAM=

#Puma
WEB_CONCURRENCY= 8

# Websites
URL_FLIGHTIO_GET=
URL_FLIGHTIO_SEARCH=
@@ -18,14 +18,14 @@
state_path "#{shared_dir}/pids/puma.state"
activate_control_app

threads_count = ENV['RAILS_ENV'] == 'development' ? 1 : ENV.fetch('RAILS_MAX_THREADS') { 16 }.to_i
threads_count = ENV['RAILS_ENV'] == 'development' ? 1 : ENV.fetch('RAILS_MAX_THREADS') { 5 }.to_i
threads threads_count, threads_count

# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
#
port ENV.fetch('PORT') { 3000 }

workers ENV['RAILS_ENV'] == 'development' ? 1 : ENV.fetch('WEB_CONCURRENCY') { 16 }
workers ENV['RAILS_ENV'] == 'development' ? 1 : ENV.fetch('WEB_CONCURRENCY') { 8 }

preload_app!

0 comments on commit a679342

Please sign in to comment.
You can’t perform that action at this time.