Skip to content

Commit 42cb499

Browse files
committed
upgrade puma
1 parent e75bd99 commit 42cb499

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ruby '3.4.7'
55

66
gem 'rails', '~> 8'
77
gem 'pg', '~> 1.3.4'
8-
gem 'puma', '~> 6.6'
8+
gem 'puma', '~> 7.2'
99
gem 'bcrypt', '3.1.17'
1010
gem 'rack', '~> 2.2.22'
1111
gem 'rack-timeout', '~> 0.7', require: 'rack/timeout/base'

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ GEM
337337
date
338338
stringio
339339
public_suffix (4.0.6)
340-
puma (6.6.0)
340+
puma (7.2.0)
341341
nio4r (~> 2.0)
342342
raabro (1.4.0)
343343
racc (1.8.1)
@@ -551,7 +551,7 @@ DEPENDENCIES
551551
ostruct
552552
parallel_tests (~> 5.5)
553553
pg (~> 1.3.4)
554-
puma (~> 6.6)
554+
puma (~> 7.2)
555555
rack (~> 2.2.22)
556556
rack-attack (~> 6.6)
557557
rack-cors

config/puma.rb

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,31 @@
3030
http_content_length_limit max_request_size.to_i
3131
end
3232

33-
# FIXME(ezekg) https://www.heroku.com/blog/pumas-routers-keepalives-ohmy/
34-
enable_keep_alives false
35-
3633
# Ensure our backlog is drained
3734
drain_on_shutdown
3835

3936
# Use the `preload_app!` method when specifying a `workers` number.
4037
# This directive tells Puma to first boot the application and load code
4138
# before forking the application. This takes advantage of Copy On Write
4239
# process behavior so workers use less memory. If you use this option
43-
# you need to make sure to reconnect any threads in the `on_worker_boot`
40+
# you need to make sure to reconnect any threads in the `before_worker_boot`
4441
# block.
4542
preload_app!
4643

4744
# Add some logging to understand what Puma is doing
48-
on_worker_boot do
45+
before_worker_boot do
4946
Keygen.logger.info("[puma] [#{Process.pid}] worker boot event")
5047
end
5148

52-
on_worker_shutdown do
49+
before_worker_shutdown do
5350
Keygen.logger.info("[puma] [#{Process.pid}] worker shutdown event")
5451
end
5552

56-
on_refork do
53+
before_refork do
5754
Keygen.logger.info("[puma] [#{Process.pid}] refork event")
5855
end
5956

60-
on_restart do
57+
before_restart do
6158
Keygen.logger.info("[puma] [#{Process.pid}] restart event")
6259
end
6360

0 commit comments

Comments
 (0)