puma 4.3.7 → 4.3.8

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puma might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13b795e06976ed8b1004a190e018db051811b3518acdbe3679d0490fee7ee730
4
- data.tar.gz: ebef22a424d8e8bc59dd8647b0f728818b9d1ae788ca9ff64a778830e3030349
3
+ metadata.gz: 0133cf43153c495af4daa489fd6db234a14fb0d7b72201b71260d4d57dfb1211
4
+ data.tar.gz: a1a369772eaf8e3e0efa2931c4cdfdc1880314540c260d6c01226f4b0fd2a863
5
5
  SHA512:
6
- metadata.gz: 98039dfcc8dac9fe7b7ac72cf9970649922c20b5510606a71d3078b83fb20ec8e83febe6be0a9d76bc9d01461937fe7bfd699622f5155e71e86b045fbbcc8dd9
7
- data.tar.gz: bb502e59009a55d465b1903cc08f68e9841fbc832bda6f790bd46c7748f2684d5a1e9fc319225e3e49f073478ca2e270f6b5f3a37cc6e562846d84132796e164
6
+ metadata.gz: 6dfe3a8aa4e40676eb2c70822dac050c75f9bf9ec5270626e2b282a5971f323b2661d5792a4d24982e236f378a13ddf8408080e18bf7f4957cfd5971a7d8d034
7
+ data.tar.gz: 95706c08d6b746d82af99474001664b282bf760fbbef14860b5e6897dd4eaedc3f4b49a5da2a1809dcfcf0a23fe5f62baabe5da88c631c8228889c615248fe03
data/History.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 4.3.8 / 2021-05-11
2
+
3
+ * Security
4
+ * Close keepalive connections after the maximum number of fast inlined requests (#2625)
5
+
1
6
  ## 4.3.7 / 2020-11-30
2
7
 
3
8
  * Bugfixes
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 = "4.3.7".freeze
103
+ PUMA_VERSION = VERSION = "4.3.8".freeze
104
104
  CODE_NAME = "Mysterious Traveller".freeze
105
105
  PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze
106
106
 
data/lib/puma/server.rb CHANGED
@@ -483,15 +483,20 @@ module Puma
483
483
 
484
484
  requests += 1
485
485
 
486
- check_for_more_data = @status == :run
486
+ # Closing keepalive sockets after they've made a reasonable
487
+ # number of requests allows Puma to service many connections
488
+ # fairly, even when the number of concurrent connections exceeds
489
+ # the size of the threadpool. It also allows cluster mode Pumas
490
+ # to keep load evenly distributed across workers, because clients
491
+ # are randomly assigned a new worker when opening a new connection.
492
+ #
493
+ # Previously, Puma would kick connections in this conditional back
494
+ # to the reactor. However, because this causes the todo set to increase
495
+ # in size, the wait_until_full mutex would never unlock, leaving
496
+ # any additional connections unserviced.
497
+ break if requests >= MAX_FAST_INLINE
487
498
 
488
- if requests >= MAX_FAST_INLINE
489
- # This will mean that reset will only try to use the data it already
490
- # has buffered and won't try to read more data. What this means is that
491
- # every client, independent of their request speed, gets treated like a slow
492
- # one once every MAX_FAST_INLINE requests.
493
- check_for_more_data = false
494
- end
499
+ check_for_more_data = @status == :run
495
500
 
496
501
  unless client.reset(check_for_more_data)
497
502
  close_socket = false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.7
4
+ version: 4.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Phoenix
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-30 00:00:00.000000000 Z
11
+ date: 2021-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nio4r
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
- rubygems_version: 3.1.4
139
+ rubygems_version: 3.2.3
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for