Skip to content

Commit

Permalink
AO3-6890 Add puma worker killer gem (#5038)
Browse files Browse the repository at this point in the history
* AO3-6890 Add puma worker killer gem

* Remove initializer (it will be configured in Ansible)
  • Loading branch information
brianjaustin authored Jan 29, 2025
1 parent f345933 commit 1b156f9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ gem "marcel", "1.0.2"
gem "departure", "~> 6.5"

gem "rack-timeout"
gem "puma_worker_killer"

group :test do
gem "rspec-rails", "~> 6.0"
Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ GEM
fugit (1.11.1)
et-orbi (~> 1, >= 1.2.11)
raabro (~> 1.4)
get_process_mem (1.0.0)
bigdecimal (>= 2.0)
ffi (~> 1.0)
globalid (1.2.1)
activesupport (>= 6.1)
god (0.13.7)
Expand Down Expand Up @@ -423,6 +426,10 @@ GEM
public_suffix (5.0.4)
puma (6.5.0)
nio4r (~> 2.0)
puma_worker_killer (1.0.0)
bigdecimal (>= 2.0)
get_process_mem (>= 0.2)
puma (>= 2.7)
pundit (2.3.1)
activesupport (>= 3.0.0)
raabro (1.4.0)
Expand Down Expand Up @@ -699,6 +706,7 @@ DEPENDENCIES
pickle
pry-byebug
puma (~> 6.5.0)
puma_worker_killer
pundit
rack (~> 2.2)
rack-attack
Expand Down
5 changes: 5 additions & 0 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -746,3 +746,8 @@ PERCONA_ARGS: >
# Production has more than 5 for these
BOOKMARKABLE_SHARDS: 5
WORKS_SHARDS: 5

# Puma killer config (automatically restart Puma when resource constrained);
# both are measured in seconds.
PUMA_ROLLING_RESTART_FREQUENCY: 172800 # 2 days
PUMA_ROLLING_RESTART_SPLAY: 702

0 comments on commit 1b156f9

Please sign in to comment.