From 3e45bddfbeb1603faa88f4b6eb61ad9fe3526036 Mon Sep 17 00:00:00 2001 From: Elena Tanasoiu Date: Tue, 28 Jul 2020 18:59:43 +0100 Subject: [PATCH] Clarify how to run puma in single mode 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]: https://github.com/puma/puma/issues/1364 --- docs/deployment.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/deployment.md b/docs/deployment.md index bb12eb8c2e..29d1b4a281 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -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