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

Add a configuration option that prevents puma from queueing requests. #640

Merged
merged 3 commits into from
Jan 20, 2015
Merged

Add a configuration option that prevents puma from queueing requests. #640

merged 3 commits into from
Jan 20, 2015

Conversation

bailsman
Copy link
Contributor

Issue #612

This adds a configuration option queue_requests

With queue_requests set to true (the default), workers accept all
requests and queue them before passing them to the handlers.
With it set to false, each worker process accepts exactly as
many requests as it is configured to simultaneously handle.

In combination with threads 1, 1 this ensures that requests
are balanced across workers in a single threaded application.
This can avoid deadlocks when a single threaded app sends a
request to itself. (For example, to generate a PDF.)

With queue_requests set to true (the default), workers accept all
requests and queue them before passing them to the handlers.
With it set to false, each worker process accepts exactly as
many requests as it is configured to simultaneously handle.

In combination with threads 1, 1 this ensures that requests
are balanced across workers in a single threaded application.
This can avoid deadlocks when a single threaded app sends a
request to itself. (For example, to generate a PDF.)
evanphx added a commit that referenced this pull request Jan 20, 2015
…deadlock

Add a configuration option that prevents puma from queueing requests.
@evanphx evanphx merged commit bb2aeb8 into puma:master Jan 20, 2015
@bailsman bailsman deleted the issue-612-dependent-requests-deadlock branch January 20, 2015 22:29
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

Successfully merging this pull request may close these issues.

None yet

2 participants