Skip to content

Avoid dogpiling on start/hot restart #3236

Answered by nateberkopec
pushcx asked this question in Q&A
Discussion options

You must be logged in to vote

You're creating a footgun though in the case of an overload situation - your Puma processes will ingest more work than you have CPU time to handle, causing requests to get very slow as they wait on the CPU to be available. This creates a difficult situation as your request queue times will not increase (at least not as quickly as they would otherwise), because Puma is still starting to process requests, but processing them slower.

If you're using the threadpool, a 1 to 1 ratio of workers to cpu cores is best.

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@pushcx
Comment options

@dentarg
Comment options

@nateberkopec
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@pushcx
Comment options

@nateberkopec
Comment options

@pushcx
Comment options

@nateberkopec
Comment options

Answer selected by dentarg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants