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 +4 -4
- data/History.txt +9 -1
- data/lib/puma/configuration.rb +7 -0
- data/lib/puma/const.rb +1 -1
- data/lib/puma/server.rb +2 -0
- data/lib/puma/thread_pool.rb +7 -2
- data/test/test_thread_pool.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a44132e0d62673bb33d40984a571d0143924cd6f
|
4
|
+
data.tar.gz: e88c336217ade2bad4b5952af5d178fb413fe9ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 428001bf5a64de77ece58679cf7250173f0c11f5fa956bc437abb23307354e93ae4620e7dfe1a7f098ce11c9b3683ac398c26a4bddf45ed47b6053a2796506de
|
7
|
+
data.tar.gz: 0a131013da955c7b4c569aff0249b7de6e909f679cc53113ddc830549e52427fee054c119289f7e00e23cc7d1062fc98ba1247149696e912de0f4cc0b608e7d7
|
data/History.txt
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
=== 2.10.
|
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.
|
data/lib/puma/configuration.rb
CHANGED
@@ -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)
|
data/lib/puma/const.rb
CHANGED
data/lib/puma/server.rb
CHANGED
data/lib/puma/thread_pool.rb
CHANGED
@@ -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
|
-
|
93
|
-
Thread.current
|
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)
|
data/test/test_thread_pool.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|