puma 2.10.1 → 2.10.2

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
  SHA1:
3
- metadata.gz: 0bb894db7abeda0bc6e6f3a8f986e3c738c16122
4
- data.tar.gz: 19d26c21f925e0d6dddd3470010a5c4973e95499
3
+ metadata.gz: a44132e0d62673bb33d40984a571d0143924cd6f
4
+ data.tar.gz: e88c336217ade2bad4b5952af5d178fb413fe9ef
5
5
  SHA512:
6
- metadata.gz: ef6e05623ef8e04259b2bd13315b97cd9e4647b105b41469d9b6ccf0e8de3e50421638bda94ba2a805bb5eb513799931b1ce0d6017b5bf5cfbd475e58415ea23
7
- data.tar.gz: 3c72bf69f2bbd23f65f1b2ddc289029cd306927b5494d7d68034ffa557e9d0b435573f792d993111f0aa64ca0c948fa922423998535cd03882295d88750846c9
6
+ metadata.gz: 428001bf5a64de77ece58679cf7250173f0c11f5fa956bc437abb23307354e93ae4620e7dfe1a7f098ce11c9b3683ac398c26a4bddf45ed47b6053a2796506de
7
+ data.tar.gz: 0a131013da955c7b4c569aff0249b7de6e909f679cc53113ddc830549e52427fee054c119289f7e00e23cc7d1062fc98ba1247149696e912de0f4cc0b608e7d7
@@ -1,4 +1,12 @@
1
- === 2.10.1 / 2014-11-14
1
+ === 2.10.2 / 2014-11-26
2
+
3
+ * 1 bug fix:
4
+ * Conditionalize thread local cleaning, fixes perf degradation fix
5
+ The code to clean out all Thread locals adds pretty significant
6
+ overhead to a each request, so it has to be turned on explicitly
7
+ if a user needs it.
8
+
9
+ === 2.10.1 / 2014-11-24
2
10
 
3
11
  * 1 bug fix:
4
12
  * Load the app after daemonizing because the app might start threads.
@@ -212,6 +212,13 @@ module Puma
212
212
  @options[:binds] << "tcp://#{Configuration::DefaultTCPHost}:#{port}"
213
213
  end
214
214
 
215
+ # Work around leaky apps that leave garbage in Thread locals
216
+ # across requests
217
+ #
218
+ def clean_thread_locals(which=true)
219
+ @options[:clean_thread_locals] = which
220
+ end
221
+
215
222
  # Daemonize the server into the background. Highly suggest that
216
223
  # this be combined with +pidfile+ and +stdout_redirect+.
217
224
  def daemonize(which=true)
@@ -28,7 +28,7 @@ module Puma
28
28
  # too taxing on performance.
29
29
  module Const
30
30
 
31
- PUMA_VERSION = VERSION = "2.10.1".freeze
31
+ PUMA_VERSION = VERSION = "2.10.2".freeze
32
32
  CODE_NAME = "Robots on Comets".freeze
33
33
 
34
34
  FAST_TRACK_KA_TIMEOUT = 0.2
@@ -259,6 +259,8 @@ module Puma
259
259
  end
260
260
  end
261
261
 
262
+ @thread_pool.clean_thread_locals = @options[:clean_thread_locals]
263
+
262
264
  @reactor = Reactor.new self, @thread_pool
263
265
 
264
266
  @reactor.run_in_thread
@@ -36,9 +36,12 @@ module Puma
36
36
  @mutex.synchronize do
37
37
  @min.times { spawn_thread }
38
38
  end
39
+
40
+ @clean_thread_locals = false
39
41
  end
40
42
 
41
43
  attr_reader :spawned, :trim_requested
44
+ attr_accessor :clean_thread_locals
42
45
 
43
46
  # How many objects have yet to be processed by the pool?
44
47
  #
@@ -89,8 +92,10 @@ module Puma
89
92
 
90
93
  break unless continue
91
94
 
92
- Thread.current.keys.each do |key|
93
- Thread.current[key] = nil unless key == :__recursive_key__
95
+ if @clean_thread_locals
96
+ Thread.current.keys.each do |key|
97
+ Thread.current[key] = nil unless key == :__recursive_key__
98
+ end
94
99
  end
95
100
 
96
101
  block.call(work, *extra)
@@ -167,6 +167,8 @@ class TestThreadPool < Test::Unit::TestCase
167
167
  Thread.pass until finished
168
168
  }
169
169
 
170
+ pool.clean_thread_locals = true
171
+
170
172
  n.times { pool << 1 }
171
173
 
172
174
  finished = true
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: 2.10.1
4
+ version: 2.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Phoenix
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-24 00:00:00.000000000 Z
11
+ date: 2014-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack