Skip to content

Commit

Permalink
Clarify how to run puma in single mode
Browse files Browse the repository at this point in the history
When starting to transition from Unicorn to Puma, I first tried out
puma in development. I initially assumed from skimming the docs that
the number of workers for single mode should be 1. This led to our
developers not being able to kill their puma server properly in our
dev environment via Ctrl+C since the master process would stick
around and try to revive it.

Upon reading the docs more carefully and checking out the issues,
I found [I wasn't alone][issue-on-single-mode]. While it's obvious
that 1 worker implies the existence of a master process, when you're
just starting out it might take you a little while before you get
your head around single mode versus cluster mode and having the
configuration clearly stated helps with that imo.

So to make it blatantly obvious how to run puma in single mode,
I've added a line to the docs to explain it.

[issue-on-single-mode]: #1364
  • Loading branch information
elenatanasoiu committed Jul 28, 2020
1 parent df57cec commit 3e45bdd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/deployment.md
Expand Up @@ -20,7 +20,10 @@ Welcome back!
Puma was originally conceived as a thread-only webserver, but grew the ability to
also use processes in version 2.

Here are some rules of thumb:
To run puma in single mode (e.g. for a development environment) you will need to
set the number of workers to 0, anything above will run in cluster mode.

Here are some rules of thumb for cluster mode:

### MRI

Expand Down

0 comments on commit 3e45bdd

Please sign in to comment.