Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Check-in puma.rb #311

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
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
17 changes: 7 additions & 10 deletions config/puma.rb.sample → config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@
# end

environment 'production'
daemonize true

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this is commented out?

pidfile 'tmp/pids/puma.pid'
state_path 'tmp/pids/puma.state'

# stdout_redirect 'log/puma.log', 'log/puma_err.log'
stdout_redirect 'log/puma.log', 'log/puma_err.log'

# quiet
threads 0, 30
bind 'unix://tmp/sockets/puma.sock'
threads Integer(ENV['MIN_THREADS'] || 1), Integer(ENV['MAX_THREADS'] || 10)
bind 'unix:///tmp/coursemology_puma.sock'

# ssl_bind '127.0.0.1', '9292', { key: path_to_key, cert: path_to_cert }

Expand All @@ -31,12 +27,13 @@

# === Cluster mode ===

# workers 2

workers 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and should set this to # of cpus on the virtual server. not sure if ours has 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, we have 2. grep processor /proc/cpuinfo | wc -l says 2.

# on_worker_boot do
# puts 'On worker boot...'
# end

# === Puma control rack application ===

activate_control_app 'unix://tmp/sockets/pumactl.sock'
activate_control_app 'unix:///tmp/coursemology_pumactl.sock'

preload_app!