Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
port ENV.fetch("PORT", 3000)

# Use multiple workers (forked processes) to handle requests in parallel.
# Each worker gets its own thread pool, enabling use of multiple CPU cores.
workers ENV.fetch("WEB_CONCURRENCY", 1).to_i

preload_app!

# Allow puma to be restarted by `bin/rails restart` command.
plugin :tmp_restart

Expand Down