Skip to content

Commit

Permalink
Set the puma persistent_timeout higher than nginx
Browse files Browse the repository at this point in the history
If the load balancer/proxy/server in front of Conjur has
a longer timeout than Conjur, there will be 502s as Conjur will
close the connection even if there are pending requests.  This
can lead to it being marked unavailable, errors returned to the
client and performance issues as nginx/load balancer in front of it
  • Loading branch information
ismarc committed May 21, 2021
1 parent 5ab07f4 commit 4026019
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed
- Specify keepalive timeout for puma to be longer than proxy and load balancers

## [1.11.6] - 2021-04-28

### Fixed
Expand Down
6 changes: 6 additions & 0 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
# cause and implement a permanent solution.
worker_timeout 600

# Set the keepalive timeout higher than what nginx is set to
# Defaults to 20
# A shorter value on the Conjur side causes errors and
# potential instability
persistent_timeout 80

preload_app!

rackup DefaultRackup
Expand Down

0 comments on commit 4026019

Please sign in to comment.