puma 1.6.1-java → 1.6.2-java

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.

data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 1.6.2 / 2012-08-27
2
+
3
+ * 1 bug fix:
4
+ * Rescue StandardError instead of IOError to handle SystemCallErrors
5
+ as well as other application exceptions inside the reactor.
6
+
1
7
  === 1.6.1 / 2012-07-23
2
8
 
3
9
  * 1 packaging bug fixed:
data/README.md CHANGED
@@ -122,6 +122,10 @@ If you start puma with `-S some/path` then you can pass that same path to the `p
122
122
 
123
123
  will cause the server to perform a restart. `pumactl` is a simple CLI frontend to the control/status app described above.
124
124
 
125
+ ## Managing multiple Pumas / init.d script
126
+
127
+ If you want an easy way to manage multiple scripts at once check [tools/jungle](https://github.com/puma/puma/tree/master/tools/jungle) for an init.d script.
128
+
125
129
  ## License
126
130
 
127
131
  Puma is copyright 2011 Evan Phoenix and contributors. It is licensed under the BSD license. See the include LICENSE file for details.
data/lib/puma/const.rb CHANGED
@@ -25,7 +25,7 @@ module Puma
25
25
  # too taxing on performance.
26
26
  module Const
27
27
 
28
- PUMA_VERSION = VERSION = "1.6.1".freeze
28
+ PUMA_VERSION = VERSION = "1.6.2".freeze
29
29
 
30
30
  # The default number of seconds for another request within a persistent
31
31
  # session.
Binary file
data/lib/puma/reactor.rb CHANGED
@@ -12,10 +12,12 @@ module Puma
12
12
  @input = []
13
13
  @sleep_for = DefaultSleepFor
14
14
  @timeouts = []
15
+
16
+ @sockets = [@ready]
15
17
  end
16
18
 
17
19
  def run
18
- sockets = [@ready]
20
+ sockets = @sockets
19
21
 
20
22
  while true
21
23
  ready = IO.select sockets, nil, nil, @sleep_for
@@ -53,7 +55,7 @@ module Puma
53
55
 
54
56
  @events.parse_error @server, c.env, e
55
57
 
56
- rescue IOError => e
58
+ rescue StandardError => e
57
59
  c.close
58
60
  sockets.delete c
59
61
  end
@@ -79,12 +81,14 @@ module Puma
79
81
 
80
82
  def run_in_thread
81
83
  @thread = Thread.new {
82
- begin
83
- run
84
- rescue Exception => e
85
- puts "MAJOR ERROR DETECTED"
86
- p e
87
- puts e.backtrace
84
+ while true
85
+ begin
86
+ run
87
+ break
88
+ rescue StandardError => e
89
+ STDERR.puts "Error in reactor loop escaped: #{e.message} (#{e.class})"
90
+ puts e.backtrace
91
+ end
88
92
  end
89
93
  }
90
94
  end
data/puma.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "puma"
5
- s.version = "1.6.1"
5
+ s.version = "1.6.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Evan Phoenix"]
9
- s.date = "2012-08-12"
9
+ s.date = "2012-08-27"
10
10
  s.description = "Puma is a simple, fast, and highly concurrent HTTP 1.1 server for Ruby web applications. It can be used with any application that supports Rack, and is considered the replacement for Webrick and Mongrel. It was designed to be the go-to server for [Rubinius](http://rubini.us), but also works well with JRuby and MRI. Puma is intended for use in both development and production environments.\n\nUnder the hood, Puma processes requests using a C-optimized Ragel extension (inherited from Mongrel) that provides fast, accurate HTTP 1.1 protocol parsing in a portable way. Puma then serves the request in a thread from an internal thread pool (which you can control). This allows Puma to provide real concurrency for your web application!\n\nWith Rubinius 2.0, Puma will utilize all cores on your CPU with real threads, meaning you won't have to spawn multiple processes to increase throughput. You can expect to see a similar benefit from JRuby.\n\nOn MRI, there is a Global Interpreter Lock (GIL) that ensures only one thread can be run at a time. But if you're doing a lot of blocking IO (such as HTTP calls to external APIs like Twitter), Puma still improves MRI's throughput by allowing blocking IO to be run concurrently (EventMachine-based servers such as Thin turn off this ability, requiring you to use special libraries). Your mileage may vary. In order to get the best throughput, it is highly recommended that you use a Ruby implementation with real threads like [Rubinius](http://rubini.us) or [JRuby](http://jruby.org)."
11
11
  s.email = ["evan@phx.io"]
12
12
  s.executables = ["puma", "pumactl"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: puma
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.6.1
5
+ version: 1.6.2
6
6
  platform: java
7
7
  authors:
8
8
  - Evan Phoenix
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-08-12 00:00:00 Z
13
+ date: 2012-08-27 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack