Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is Puma starting in cluster mode... with --workers 1 ? #1364

Closed
ahx opened this issue Jul 11, 2017 · 1 comment
Closed

Why is Puma starting in cluster mode... with --workers 1 ? #1364

ahx opened this issue Jul 11, 2017 · 1 comment

Comments

@ahx
Copy link

ahx commented Jul 11, 2017

Steps to reproduce

puma --workers 1

Expected behavior

[98939] Puma starting in single mode...

Actual behavior

[98939] Puma starting in cluster mode...

System configuration

Ruby version: 2.4.1p111

Is this intended behaviour?
Is there a difference between single mode and cluster moder with workers = 1?

@nateberkopec
Copy link
Member

Yes. Single mode is --worker 0.

In single mode, there is only one process. In cluster mode, you'll see a worker and master process.

elenatanasoiu added a commit to elenatanasoiu/puma that referenced this issue Jul 28, 2020
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]: puma#1364
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants