Skip to content

Commit

Permalink
Max. threads defined by MAX_CONNECTION_POOL_SIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
rammpeter committed May 10, 2022
1 parent e3ca9b2 commit e6019b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
FROM oraclelinux:8-slim as build_stage

ENV BACKEND_SRC_PATH=.
# Default for RAILS_MAX_THREADS to work for every CMD in docker container
ENV RAILS_MAX_THREADS=300
ARG JRUBY_VERSION
ENV PATH "$PATH:/opt/jruby-$JRUBY_VERSION/bin"

Expand Down
4 changes: 2 additions & 2 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum, this matches the default thread size of Active Record.
#
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
threads threads_count, threads_count
threads_count = ENV.fetch("MAX_CONNECTION_POOL_SIZE") { 100 }.to_i
threads 5, threads_count

# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
#
Expand Down

0 comments on commit e6019b3

Please sign in to comment.