We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bf8626 commit 3a24309Copy full SHA for 3a24309
frameworks/Ruby/rack/config/puma.rb
@@ -1,4 +1,4 @@
1
-if ENV.fetch('WEB_CONCURRENCY') == 'auto'
+if ENV.fetch('WEB_CONCURRENCY').to_i > 1
2
before_fork do
3
Sequel::DATABASES.each(&:disconnect)
4
end
frameworks/Ruby/rack/rack.dockerfile
@@ -17,9 +17,9 @@ RUN bundle install --jobs=8
17
18
COPY . .
19
20
-ENV WEB_CONCURRENCY=auto
21
ENV MAX_THREADS=5
22
23
EXPOSE 8080
24
25
-CMD bundle exec puma -C config/puma.rb -b tcp://0.0.0.0:8080 -e production
+CMD export WEB_CONCURRENCY=$(($(nproc)*5/4)) && \
+ bundle exec puma -C config/puma.rb -b tcp://0.0.0.0:8080 -e production
0 commit comments