puma 7.0.1 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/History.md +21 -0
- data/lib/puma/cluster/worker_handle.rb +2 -0
- data/lib/puma/configuration.rb +3 -1
- data/lib/puma/const.rb +1 -1
- data/lib/puma/control_cli.rb +3 -0
- data/lib/puma/request.rb +7 -1
- data/lib/puma/server.rb +4 -4
- data/lib/puma/thread_pool.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7a5fc93f89e02a2687f0266b0b9d4bd022ab373468b38fd93ab8c9d93fd3e60
|
4
|
+
data.tar.gz: 27d1faa8805df15e6f0cecea9469c21f99ac3ab971f817062b6f7f4a3f098160
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df56ab248fda787f6f5a5d68d25a0888cf79aafc2a76302e48d35c684ac8d461519d728016fb7244a993969c08879d22819b73b96a92abef046119e0cbfae82e
|
7
|
+
data.tar.gz: a4aab29ff5d6b87f2c099800fad9a963c785777d9fc8e0f3df33ca51ae04835dfb27f282512294c48dd51e2c34f9b6083fc7e1dd2b42a5e8a99b625c6688b5ab
|
data/History.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## 7.0.3 / 2025-09-13
|
2
|
+
|
3
|
+
* Performance
|
4
|
+
* server.rb - process_client - add ka to todo if readable & complete ([#3748])
|
5
|
+
|
6
|
+
* Bugfixes
|
7
|
+
* Convert PUMA_PERSISTENT_TIMEOUT to an Integer ([#3749])
|
8
|
+
|
9
|
+
## 7.0.2 / 2025-09-08
|
10
|
+
|
11
|
+
* Bugfixes
|
12
|
+
* bug: control_cli.rb - Fixup `pumactl` code to load puma.rb for `deprecate_method_change` ([#3736], [#3734])
|
13
|
+
* Replace sleep spin lock with condition variable ([#3729])
|
14
|
+
* Fix Puma not booting if queue_requests disabled ([#3731])
|
15
|
+
|
1
16
|
## 7.0.1 / 2025-09-06
|
2
17
|
|
3
18
|
* Bugfixes
|
@@ -2219,6 +2234,12 @@ be added back in a future date when a java Puma::MiniSSL is added.
|
|
2219
2234
|
* Bugfixes
|
2220
2235
|
* Your bugfix goes here <Most recent on the top, like GitHub> (#Github Number)
|
2221
2236
|
|
2237
|
+
[#3748]:https://github.com/puma/puma/pull/3748 "PR by @MSP-Greg, merged 2025-09-14"
|
2238
|
+
[#3749]:https://github.com/puma/puma/pull/3749 "PR by @schneems, merged 2025-09-14"
|
2239
|
+
[#3736]:https://github.com/puma/puma/pull/3736 "PR by @MSP-Greg, merged 2025-09-08"
|
2240
|
+
[#3734]:https://github.com/puma/puma/issues/3734 "Issue by @espen, closed 2025-09-08"
|
2241
|
+
[#3729]:https://github.com/puma/puma/pull/3729 "PR by @bensheldon, merged 2025-09-08"
|
2242
|
+
[#3731]:https://github.com/puma/puma/pull/3731 "PR by @stanhu, merged 2025-09-06"
|
2222
2243
|
[#3725]:https://github.com/puma/puma/pull/3725 "PR by @tannakartikey, merged 2025-09-05"
|
2223
2244
|
[#3719]:https://github.com/puma/puma/pull/3719 "PR by @schneems, merged 2025-09-03"
|
2224
2245
|
[#3378]:https://github.com/puma/puma/pull/3378 "PR by @shayonj, merged 2025-08-19"
|
data/lib/puma/configuration.rb
CHANGED
@@ -154,7 +154,7 @@ module Puma
|
|
154
154
|
mutate_stdout_and_stderr_to_sync_on_write: true,
|
155
155
|
out_of_band: [],
|
156
156
|
# Number of seconds for another request within a persistent session.
|
157
|
-
persistent_timeout:
|
157
|
+
persistent_timeout: 65, # PUMA_PERSISTENT_TIMEOUT
|
158
158
|
queue_requests: true,
|
159
159
|
rackup: 'config.ru'.freeze,
|
160
160
|
raise_exception_on_sigterm: true,
|
@@ -236,6 +236,7 @@ module Puma
|
|
236
236
|
def puma_options_from_env(env = ENV)
|
237
237
|
min = env['PUMA_MIN_THREADS'] || env['MIN_THREADS']
|
238
238
|
max = env['PUMA_MAX_THREADS'] || env['MAX_THREADS']
|
239
|
+
persistent_timeout = env['PUMA_PERSISTENT_TIMEOUT']
|
239
240
|
workers = if env['WEB_CONCURRENCY'] == 'auto'
|
240
241
|
require_processor_counter
|
241
242
|
::Concurrent.available_processor_count
|
@@ -246,6 +247,7 @@ module Puma
|
|
246
247
|
{
|
247
248
|
min_threads: min && min != "" && Integer(min),
|
248
249
|
max_threads: max && max != "" && Integer(max),
|
250
|
+
persistent_timeout: persistent_timeout && persistent_timeout != "" && Integer(persistent_timeout),
|
249
251
|
workers: workers && workers != "" && Integer(workers),
|
250
252
|
environment: env['APP_ENV'] || env['RACK_ENV'] || env['RAILS_ENV'],
|
251
253
|
}
|
data/lib/puma/const.rb
CHANGED
@@ -100,7 +100,7 @@ module Puma
|
|
100
100
|
# too taxing on performance.
|
101
101
|
module Const
|
102
102
|
|
103
|
-
PUMA_VERSION = VERSION = "7.0.
|
103
|
+
PUMA_VERSION = VERSION = "7.0.3"
|
104
104
|
CODE_NAME = "Romantic Warrior"
|
105
105
|
|
106
106
|
PUMA_SERVER_STRING = ["puma", PUMA_VERSION, CODE_NAME].join(" ").freeze
|
data/lib/puma/control_cli.rb
CHANGED
data/lib/puma/request.rb
CHANGED
@@ -273,11 +273,17 @@ module Puma
|
|
273
273
|
!shutting_down? && keep_alive
|
274
274
|
end
|
275
275
|
|
276
|
+
HTTP_ON_VALUES = { "on" => true, HTTPS => true }
|
277
|
+
private_constant :HTTP_ON_VALUES
|
278
|
+
|
276
279
|
# @param env [Hash] see Puma::Client#env, from request
|
277
280
|
# @return [Puma::Const::PORT_443,Puma::Const::PORT_80]
|
278
281
|
#
|
279
282
|
def default_server_port(env)
|
280
|
-
if [
|
283
|
+
if HTTP_ON_VALUES[env[HTTPS_KEY]] ||
|
284
|
+
env[HTTP_X_FORWARDED_PROTO]&.start_with?(HTTPS) ||
|
285
|
+
env[HTTP_X_FORWARDED_SCHEME] == HTTPS ||
|
286
|
+
env[HTTP_X_FORWARDED_SSL] == "on"
|
281
287
|
PORT_443
|
282
288
|
else
|
283
289
|
PORT_80
|
data/lib/puma/server.rb
CHANGED
@@ -382,7 +382,7 @@ module Puma
|
|
382
382
|
else
|
383
383
|
# if ThreadPool out_of_band code is running, we don't want to add
|
384
384
|
# clients until the code is finished.
|
385
|
-
|
385
|
+
pool.wait_while_out_of_band_running
|
386
386
|
|
387
387
|
# only use delay when clustered and busy
|
388
388
|
if pool.busy_threads >= @max_threads
|
@@ -508,7 +508,7 @@ module Puma
|
|
508
508
|
next_request_ready = if client.has_back_to_back_requests?
|
509
509
|
with_force_shutdown(client) { client.process_back_to_back_requests }
|
510
510
|
else
|
511
|
-
|
511
|
+
with_force_shutdown(client) { client.eagerly_finish }
|
512
512
|
end
|
513
513
|
|
514
514
|
if next_request_ready
|
@@ -685,13 +685,13 @@ module Puma
|
|
685
685
|
stats = @thread_pool&.stats || {}
|
686
686
|
stats[:max_threads] = @max_threads
|
687
687
|
stats[:requests_count] = @requests_count
|
688
|
-
stats[:reactor_max] = @reactor.reactor_max
|
688
|
+
stats[:reactor_max] = @reactor.reactor_max if @reactor
|
689
689
|
reset_max
|
690
690
|
stats
|
691
691
|
end
|
692
692
|
|
693
693
|
def reset_max
|
694
|
-
@reactor.reactor_max = 0
|
694
|
+
@reactor.reactor_max = 0 if @reactor
|
695
695
|
@thread_pool.reset_max
|
696
696
|
end
|
697
697
|
|
data/lib/puma/thread_pool.rb
CHANGED
@@ -53,6 +53,7 @@ module Puma
|
|
53
53
|
@block = block
|
54
54
|
@out_of_band = options[:out_of_band]
|
55
55
|
@out_of_band_running = false
|
56
|
+
@out_of_band_condvar = ConditionVariable.new
|
56
57
|
@before_thread_start = options[:before_thread_start]
|
57
58
|
@before_thread_exit = options[:before_thread_exit]
|
58
59
|
@reaping_time = options[:reaping_time]
|
@@ -227,10 +228,19 @@ module Puma
|
|
227
228
|
true
|
228
229
|
ensure
|
229
230
|
@out_of_band_running = false
|
231
|
+
@out_of_band_condvar.broadcast
|
230
232
|
end
|
231
233
|
|
232
234
|
private :trigger_out_of_band_hook
|
233
235
|
|
236
|
+
def wait_while_out_of_band_running
|
237
|
+
return unless @out_of_band_running
|
238
|
+
|
239
|
+
with_mutex do
|
240
|
+
@out_of_band_condvar.wait(@mutex) while @out_of_band_running
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
234
244
|
# @version 5.0.0
|
235
245
|
def with_mutex(&block)
|
236
246
|
@mutex.owned? ?
|