puma 5.1.1-java → 5.2.0-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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56c9365f484f491cb4ca39830e4e3a797abebb8e7f2616cfde644bb74584d73b
4
- data.tar.gz: 6ca2712343a683ed5936658ab643a5208bdace47e75375c347b5df8046af2434
3
+ metadata.gz: 18cfabde3c7db16a77cb391148c67ff674e32f0d4bdcc49c25a3b85321004b1b
4
+ data.tar.gz: afea87c5cf5f105b6971e92925de6020d6562e4715ef3e8e28f972b7d457b094
5
5
  SHA512:
6
- metadata.gz: aabf9512ae96a33aaaf3786a1c9e83328c2768948213e3b227a9b83ef0ed109d35417df92e1a7b7ddec80d00977aabdef23555c579b3207807082d8aeb06f513
7
- data.tar.gz: 4086e2b9ed1b2d9ecd6d3fe904ab7cfb4c06384d262a89a73b269a5d7414d49fae5d3c8cb978fe270663e610239f9a194a013840b07dea5a21011dbb802fd0b4
6
+ metadata.gz: aee33c61e446787e45d92d1348de7a28a657358904adc46afa691c099d66ffda26a27dd131c2904f4cc64d52fa84054394be4453f6a6072c67f59cf8bc9734c7
7
+ data.tar.gz: 5baf1e4089cf503014799c3b68fc2cae1cb80ceb21195a437a8badcaf740e0866df84d1490cad597b14e4e1461b55654e20b60820b58fa19076c3ba78933ad93
data/History.md CHANGED
@@ -1,8 +1,30 @@
1
+ ## 5.2.0 / 2021-01-27
2
+
3
+ * Features
4
+ * 10x latency improvement for MRI on ssl connections by reducing overhead ([#2519])
5
+ * Add option to specify the desired IO selector backend for libev ([#2522])
6
+ * Add ability to set OpenSSL verification flags (MRI only) ([#2490])
7
+ * Uses `flush` after writing messages to avoid mutating $stdout and $stderr using `sync=true` ([#2486])
8
+
9
+ * Bugfixes
10
+ * MiniSSL - Update dhparam to 2048 bit for use with SSL_CTX_set_tmp_dh ([#2535])
11
+ * Change 'Goodbye!' message to be output after listeners are closed ([#2529])
12
+ * Fix ssl bind logging with 0.0.0.0 and localhost ([#2533])
13
+ * Fix compiler warnings, but skipped warnings related to ragel state machine generated code ([#1953])
14
+ * Fix phased restart errors related to nio4r gem when using the Puma control server ([#2516])
15
+ * Add `#string` method to `Puma::NullIO` ([#2520])
16
+ * Fix binding via Rack handler to IPv6 addresses ([#2521])
17
+
18
+ * Refactor
19
+ * Refactor MiniSSL::Context on MRI, fix MiniSSL::Socket#write ([#2519])
20
+ * Remove `Server#read_body` ([#2531])
21
+ * Fail build if compiling extensions raises warnings on GH Actions, configurable via `MAKE_WARNINGS_INTO_ERRORS` ([#1953])
22
+
1
23
  ## 5.1.1 / 2020-12-10
2
24
 
3
- * Bugfixes
25
+ * Bugfixes
4
26
  * Fix over eager matching against banned header names ([#2510])
5
-
27
+
6
28
  ## 5.1.0 / 2020-11-30
7
29
 
8
30
  * Features
@@ -98,7 +120,7 @@
98
120
  * Daemonization has been removed without replacement. ([#2170])
99
121
  * Changed #connected_port to #connected_ports ([#2076])
100
122
  * Configuration: `environment` is read from `RAILS_ENV`, if `RACK_ENV` can't be found ([#2022])
101
- * Log binding on http:// for TCP bindings to make it clickable
123
+ * Log binding on http:// for TCP bindings to make it clickable ([#2300])
102
124
 
103
125
  * Bugfixes
104
126
  * Fix JSON loading issues on phased-restarts ([#2269])
@@ -144,16 +166,16 @@
144
166
  * Support parallel tests in verbose progress reporting ([#2223])
145
167
  * Refactor error handling in server accept loop ([#2239])
146
168
 
147
- ## 4.3.6 / 2020-09-05
169
+ ## 4.3.7 / 2020-11-30
148
170
 
149
171
  * Bugfixes
150
- * Explicitly include ctype.h to fix compilation warning and build error on macOS with Xcode 12 ([#2304])
151
- * Don't require json at boot ([#2269])
172
+ * Backport set CONTENT_LENGTH for chunked requests (Originally: [#2287], backport: [#2496])
152
173
 
153
- ## 4.3.7 / 2020-11-30
174
+ ## 4.3.6 / 2020-09-05
154
175
 
155
176
  * Bugfixes
156
- * Backport set CONTENT_LENGTH for chunked requests (Originally: [#2287], backport: [#2496])
177
+ * Explicitly include ctype.h to fix compilation warning and build error on macOS with Xcode 12 ([#2304])
178
+ * Don't require json at boot ([#2269])
157
179
 
158
180
  ## 4.3.4/4.3.5 and 3.12.5/3.12.6 / 2020-05-22
159
181
 
@@ -1672,7 +1694,19 @@ be added back in a future date when a java Puma::MiniSSL is added.
1672
1694
  * Bugfixes
1673
1695
  * Your bugfix goes here <Most recent on the top, like GitHub> (#Github Number)
1674
1696
 
1675
- [#2510]:https://github.com/puma/puma/pull/2510 "PR by @micke"
1697
+ [#2519]:https://github.com/puma/puma/pull/2519 "PR by @MSP-Greg, merged 2021-01-26"
1698
+ [#2522]:https://github.com/puma/puma/pull/2522 "PR by @jcmfernandes, merged 2021-01-12"
1699
+ [#2490]:https://github.com/puma/puma/pull/2490 "PR by @Bonias, merged 2020-12-07"
1700
+ [#2486]:https://github.com/puma/puma/pull/2486 "PR by @ccverak, merged 2020-12-02"
1701
+ [#2535]:https://github.com/puma/puma/pull/2535 "PR by @MSP-Greg, merged 2021-01-27"
1702
+ [#2529]:https://github.com/puma/puma/pull/2529 "PR by @MSP-Greg, merged 2021-01-24"
1703
+ [#2533]:https://github.com/puma/puma/pull/2533 "PR by @MSP-Greg, merged 2021-01-24"
1704
+ [#1953]:https://github.com/puma/puma/issues/1953 "Issue by @nateberkopec, closed 2020-12-01"
1705
+ [#2516]:https://github.com/puma/puma/pull/2516 "PR by @cjlarose, merged 2020-12-17"
1706
+ [#2520]:https://github.com/puma/puma/pull/2520 "PR by @dentarg, merged 2021-01-04"
1707
+ [#2521]:https://github.com/puma/puma/pull/2521 "PR by @ojab, merged 2021-01-04"
1708
+ [#2531]:https://github.com/puma/puma/pull/2531 "PR by @wjordan, merged 2021-01-19"
1709
+ [#2510]:https://github.com/puma/puma/pull/2510 "PR by @micke, merged 2020-12-10"
1676
1710
  [#2472]:https://github.com/puma/puma/pull/2472 "PR by @ccverak, merged 2020-11-02"
1677
1711
  [#2438]:https://github.com/puma/puma/pull/2438 "PR by @ekohl, merged 2020-10-26"
1678
1712
  [#2406]:https://github.com/puma/puma/pull/2406 "PR by @fdel15, merged 2020-10-19"
@@ -1736,6 +1770,7 @@ be added back in a future date when a java Puma::MiniSSL is added.
1736
1770
  [#2170]:https://github.com/puma/puma/pull/2170 "PR by @nateberkopec, merged 2020-03-10"
1737
1771
  [#2076]:https://github.com/puma/puma/pull/2076 "PR by @drews256, merged 2020-02-27"
1738
1772
  [#2022]:https://github.com/puma/puma/pull/2022 "PR by @olleolleolle, merged 2019-11-11"
1773
+ [#2300]:https://github.com/puma/puma/pull/2300 "PR by @alexeevit, merged 2020-07-06"
1739
1774
  [#2269]:https://github.com/puma/puma/pull/2269 "PR by @MSP-Greg, merged 2020-08-31"
1740
1775
  [#2312]:https://github.com/puma/puma/pull/2312 "PR by @MSP-Greg, merged 2020-07-20"
1741
1776
  [#2338]:https://github.com/puma/puma/issues/2338 "Issue by @micahhainlinestitchfix, closed 2020-08-18"
@@ -1771,8 +1806,8 @@ be added back in a future date when a java Puma::MiniSSL is added.
1771
1806
  [#2124]:https://github.com/puma/puma/pull/2124 "PR by @wjordan, merged 2020-04-14"
1772
1807
  [#2223]:https://github.com/puma/puma/pull/2223 "PR by @wjordan, merged 2020-04-20"
1773
1808
  [#2239]:https://github.com/puma/puma/pull/2239 "PR by @wjordan, merged 2020-05-15"
1774
- [#2304]:https://github.com/puma/puma/issues/2304 "Issue by @mpeltomaa, closed 2020-09-05"
1775
1809
  [#2496]:https://github.com/puma/puma/pull/2496 "PR by @TheRusskiy, merged 2020-11-30"
1810
+ [#2304]:https://github.com/puma/puma/issues/2304 "Issue by @mpeltomaa, closed 2020-09-05"
1776
1811
  [#2132]:https://github.com/puma/puma/issues/2132 "Issue by @bmclean, closed 2020-02-28"
1777
1812
  [#2010]:https://github.com/puma/puma/pull/2010 "PR by @nateberkopec, merged 2019-10-07"
1778
1813
  [#2012]:https://github.com/puma/puma/pull/2012 "PR by @headius, merged 2019-10-07"
@@ -2119,7 +2154,7 @@ be added back in a future date when a java Puma::MiniSSL is added.
2119
2154
  [#646]:https://github.com/puma/puma/pull/646 "PR by @mkonecny, merged 2015-02-05"
2120
2155
  [#630]:https://github.com/puma/puma/issues/630 "Issue by @jelmd, closed 2015-01-20"
2121
2156
  [#622]:https://github.com/puma/puma/issues/622 "Issue by @sabamotto, closed 2015-01-20"
2122
- [#583]:https://github.com/puma/puma/issues/583 "Issue by @emq, closed 2015-01-20"
2157
+ [#583]:https://github.com/puma/puma/issues/583 "Issue by @rwojsznis, closed 2015-01-20"
2123
2158
  [#586]:https://github.com/puma/puma/issues/586 "Issue by @ponchik, closed 2015-01-20"
2124
2159
  [#359]:https://github.com/puma/puma/issues/359 "Issue by @natew, closed 2014-12-13"
2125
2160
  [#633]:https://github.com/puma/puma/issues/633 "Issue by @joevandyk, closed 2015-01-20"
data/README.md CHANGED
@@ -212,6 +212,23 @@ Disable TLS v1 with the `no_tlsv1` option:
212
212
  $ puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert&no_tlsv1=true'
213
213
  ```
214
214
 
215
+ #### Controlling OpenSSL Verification Flags
216
+
217
+ To enable verification flags offered by OpenSSL, use `verification_flags` (not available for JRuby):
218
+
219
+ ```
220
+ $ puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert&verification_flags=PARTIAL_CHAIN'
221
+ ```
222
+
223
+ You can also set multiple verification flags (by separating them with coma):
224
+
225
+ ```
226
+ $ puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert&verification_flags=PARTIAL_CHAIN,CRL_CHECK'
227
+ ```
228
+
229
+ List of available flags: `USE_CHECK_TIME`, `CRL_CHECK`, `CRL_CHECK_ALL`, `IGNORE_CRITICAL`, `X509_STRICT`, `ALLOW_PROXY_CERTS`, `POLICY_CHECK`, `EXPLICIT_POLICY`, `INHIBIT_ANY`, `INHIBIT_MAP`, `NOTIFY_POLICY`, `EXTENDED_CRL_SUPPORT`, `USE_DELTAS`, `CHECK_SS_SIGNATURE`, `TRUSTED_FIRST`, `SUITEB_128_LOS_ONLY`, `SUITEB_192_LOS`, `SUITEB_128_LOS`, `PARTIAL_CHAIN`, `NO_ALT_CHAINS`, `NO_CHECK_TIME`
230
+ (see https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_hostflags.html#VERIFICATION-FLAGS).
231
+
215
232
  ### Control/Status Server
216
233
 
217
234
  Puma has a built-in status and control app that can be used to query and control Puma.
@@ -238,7 +255,7 @@ You can also provide a configuration file with the `-C` (or `--config`) flag:
238
255
  $ puma -C /path/to/config
239
256
  ```
240
257
 
241
- If no configuration file is specified, Puma will look for a configuration file at `config/puma.rb`. If an environment is specified, either via the `-e` and `--environment` flags, or through the `RACK_ENV` or the `RAILS_ENV` environment variables, Puma looks for configuration at `config/puma/<environment_name>.rb`.
258
+ If no configuration file is specified, Puma will look for a configuration file at `config/puma.rb`. If an environment is specified, either via the `-e` and `--environment` flags, or through the `RACK_ENV` or the `RAILS_ENV` environment variables, Puma first looks for configuration at `config/puma/<environment_name>.rb`, and then falls back to `config/puma.rb`.
242
259
 
243
260
  If you want to prevent Puma from looking for a configuration file in those locations, provide a dash as the argument to the `-C` (or `--config`) flag:
244
261
 
@@ -266,6 +283,7 @@ Some platforms do not support all Puma features.
266
283
 
267
284
  * **JRuby**, **Windows**: server sockets are not seamless on restart, they must be closed and reopened. These platforms have no way to pass descriptors into a new process that is exposed to Ruby. Also, cluster mode is not supported due to a lack of fork(2).
268
285
  * **Windows**: Cluster mode is not supported due to a lack of fork(2).
286
+ * **Kubernetes**: The way Kubernetes handles pod shutdowns interacts poorly with server processes implementing graceful shutdown, like Puma. See the [kubernetes section of the documentation](docs/kubernetes.md) for more details.
269
287
 
270
288
  ## Known Bugs
271
289
 
@@ -291,6 +309,10 @@ reliability in production environments:
291
309
  * [rc.d](docs/jungle/rc.d/README.md)
292
310
  * [systemd](docs/systemd.md)
293
311
 
312
+ Community guides:
313
+
314
+ * [Deploying Puma on OpenBSD using relayd and httpd](https://gist.github.com/anon987654321/4532cf8d6c59c1f43ec8973faa031103)
315
+
294
316
  ## Community Extensions
295
317
 
296
318
  ### Plugins
@@ -1,19 +1,19 @@
1
1
  # Compile Options
2
2
 
3
- There provide some `cflags` to change Puma's default configuration for C.
3
+ There are some `cflags` provided to change Puma's default configuration for its C extension.
4
4
 
5
- ## Query String
5
+ ## Query String, `PUMA_QUERY_STRING_MAX_LENGTH`
6
6
 
7
- By default, the max length of `QUERY_STRING` is `1024 * 10`. But you may want to adjust it to allow accept large queries in the GET requests.
7
+ By default, the max length of `QUERY_STRING` is `1024 * 10`. But you may want to adjust it to allow accept larger queries in GET requests.
8
8
 
9
- For manual install
9
+ For manual install, pass the `PUMA_QUERY_STRING_MAX_LENGTH` option like this:
10
10
 
11
11
  ```
12
12
  gem install puma -- --with-cflags="-D PUMA_QUERY_STRING_MAX_LENGTH=64000"
13
13
  ```
14
14
 
15
- For bundler config
15
+ For Bundler, use its configuration system:
16
16
 
17
17
  ```
18
- bundle config build.puma --with-cflags="-D PUMA_QUERY_STRING_MAX_LENGTH=64000"
18
+ bundle config build.puma "--with-cflags='-D PUMA_QUERY_STRING_MAX_LENGTH=64000'"
19
19
  ```
@@ -29,7 +29,7 @@ Here are some rules of thumb for cluster mode:
29
29
  * Use cluster mode and set the number of workers to 1.5x the number of cpu cores
30
30
  in the machine, minimum 2.
31
31
  * Set the number of threads to desired concurrent requests / number of workers.
32
- Puma defaults to 16 and that's a decent number.
32
+ Puma defaults to 5 and that's a decent number.
33
33
 
34
34
  #### Migrating from Unicorn
35
35
 
@@ -0,0 +1,66 @@
1
+ # Kubernetes
2
+
3
+ ## Running Puma in Kubernetes
4
+
5
+ In general running Puma in Kubernetes works as-is, no special configuration is needed beyond what you would write anyway to get a new Kubernetes Deployment going. There is one known interaction between the way Kubernetes handles pod termination and how Puma handles `SIGINT`, where some request might be sent to Puma after it has already entered graceful shutdown mode and is no longer accepting requests. This can lead to dropped requests during rolling deploys. A workaround for this is listed at the end of this article.
6
+
7
+ ## Basic setup
8
+
9
+ Assuming you already have a running cluster and docker image repository, you can run a simple Puma app with the following example Dockerfile and Deployment specification. These are meant as examples only and are deliberately very minimal to the point of skipping many options that are recommended for running in production, like healthchecks and envvar configuration with ConfigMaps. In general you should check the [Kubernetes documentation](https://kubernetes.io/docs/home/) and [Docker documentation](https://docs.docker.com/) for a more comprehensive overview of the available options.
10
+
11
+ A basic Dockerfile example:
12
+ ```
13
+ FROM ruby:2.5.1-alpine # can be updated to newer ruby versions
14
+ RUN apk update && apk add build-base # and any other packages you need
15
+
16
+ # Only rebuild gem bundle if Gemfile changes
17
+ COPY Gemfile Gemfile.lock ./
18
+ RUN bundle install
19
+
20
+ # Copy over the rest of the files
21
+ COPY . .
22
+
23
+ # Open up port and start the service
24
+ EXPOSE 9292
25
+ CMD bundle exec rackup -o 0.0.0.0
26
+ ```
27
+
28
+ A sample `deployment.yaml`:
29
+ ```
30
+ ---
31
+ apiVersion: apps/v1
32
+ kind: Deployment
33
+ metadata:
34
+ name: my-awesome-puma-app
35
+ spec:
36
+ selector:
37
+ matchLabels:
38
+ app: my-awesome-puma-app
39
+ template:
40
+ metadata:
41
+ labels:
42
+ app: my-awesome-puma-app
43
+ service: my-awesome-puma-app
44
+ spec:
45
+ containers:
46
+ - name: my-awesome-puma-app
47
+ image: <your image here>
48
+ ports:
49
+ - containerPort: 9292
50
+ ```
51
+
52
+ ## Graceful shutdown and pod termination
53
+
54
+ For some high-throughput systems, it is possible that some HTTP requests will return responses with response codes in the 5XX range during a rolling deploy to a new version. This is caused by [the way that Kubernetes terminates a pod during rolling deploys](https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-terminating-with-grace):
55
+
56
+ 1. The replication controller determines a pod should be shut down.
57
+ 2. The Pod is set to the “Terminating” State and removed from the endpoints list of all Services, so that it receives no more requests.
58
+ 3. The pods pre-stop hook get called. The default for this is to send `SIGTERM` to the process inside the pod.
59
+ 4. The pod has up to `terminationGracePeriodSeconds` (default: 30 seconds) to gracefully shut down. Puma will do this (after it receives SIGTERM) by closing down the socket that accepts new requests and finishing any requests already running before exiting the Puma process.
60
+ 5. If the pod is still running after `terminationGracePeriodSeconds` has elapsed, the pod receives `SIGKILL` to make sure the process inside it stops. After that, the container exits and all other Kubernetes objects associated with it are cleaned up.
61
+
62
+ There is a subtle race condition between step 2 and 3: The replication controller does not synchronously remove the pod from the Services AND THEN call the pre-stop hook of the pod, but rather it asynchronously sends "remove this pod from your endpoints" requests to the Services and then immediately proceeds to invoke the pods' pre-stop hook. If the Service controller (typically something like nginx or haproxy) receives this request handles this request "too" late (due to internal lag or network latency between the replication and Service controllers) then it is possible that the Service controller will send one or more requests to a Puma process which has already shut down its listening socket. These requests will then fail with 5XX error codes.
63
+
64
+ The way Kubernetes works this way, rather than handling step 2 synchronously, is due to the CAP theorem: in a distributed system there is no way to guarantuee that any message will arrive promptly. In particular, waiting for all Service controllers to report back might get stuck for an indefinite time if one of them has already been terminated or if there has been a net split. A way to work around this is to add a sleep to the pre-stop hook of the same time as the `terminationGracePeriodSeconds` time. This will allow the Puma process to keep serving new requests during the entire grace period, although it will no longer receive new requests after all Service controllers have propagated the removal of the pod from their endpoint lists. Then, after `terminationGracePeriodSeconds`, the pod receives `SIGKILL` and closes down. If your process can't handle SIGKILL properly, for example because it needs to release locks in different services, you can also sleep for a shorter period (and/or increase `terminationGracePeriodSeconds`) as long as the time slept is longer than the time that your Service controllers take to propagate the pod removal. The downside of this workaround is that all pods will take at minimum the amount of time slept to shut down and this will increase the time required for your rolling deploy.
65
+
66
+ More discussions and links to relevant articles can be found in https://github.com/puma/puma/issues/2343.
@@ -8,7 +8,7 @@ operations.
8
8
  * [tmp\_restart](https://github.com/puma/puma/blob/master/lib/puma/plugin/tmp_restart.rb):
9
9
  Restarts the server if the file `tmp/restart.txt` is touched
10
10
  * [heroku](https://github.com/puma/puma-heroku/blob/master/lib/puma/plugin/heroku.rb):
11
- Packages up the default configuration used by puma on Heroku
11
+ Packages up the default configuration used by puma on Heroku (being sunset with the release of Puma 5.0)
12
12
 
13
13
  Plugins are activated in a puma configuration file (such as `config/puma.rb'`)
14
14
  by adding `plugin "name"`, such as `plugin "heroku"`.
@@ -0,0 +1,142 @@
1
+ ## accessing stats
2
+
3
+ Stats can be accessed in two ways:
4
+
5
+ ### control server
6
+
7
+ `$ pumactl stats` or `GET /stats`
8
+
9
+ [Read more about `pumactl` and the control server in the README.](https://github.com/puma/puma#controlstatus-server).
10
+
11
+ ### Puma.stats
12
+
13
+ `Puma.stats` produces a JSON string. `Puma.stats_hash` produces a ruby hash.
14
+
15
+ #### in single mode
16
+
17
+ Invoke `Puma.stats` anywhere in runtime, e.g. in a rails initializer:
18
+
19
+ ```ruby
20
+ # config/initializers/puma_stats.rb
21
+
22
+ Thread.new do
23
+ loop do
24
+ sleep 30
25
+ puts Puma.stats
26
+ end
27
+ end
28
+ ```
29
+
30
+ #### in cluster mode
31
+
32
+ Invoke `Puma.stats` from the master process
33
+
34
+ ```ruby
35
+ # config/puma.rb
36
+
37
+ before_fork do
38
+ Thread.new do
39
+ loop do
40
+ puts Puma.stats
41
+ sleep 30
42
+ end
43
+ end
44
+ end
45
+ ```
46
+
47
+
48
+ ## Explanation of stats
49
+
50
+ `Puma.stats` returns different information and a different structure depending on if Puma is in single vs cluster mode. There is one top-level attribute that is common to both modes:
51
+
52
+ * started_at: when puma was started
53
+
54
+ ### single mode and individual workers in cluster mode
55
+
56
+ When Puma is run in single mode, these stats ar available at the top level. When Puma is run in cluster mode, these stats are available within the `worker_status` array in a hash labeled `last_status`, in an array of hashes, one hash for each worker.
57
+
58
+ * backlog: requests that are waiting for an available thread to be available. if this is above 0, you need more capacity [always true?]
59
+ * running: how many threads are running
60
+ * pool_capacity: the number of requests that the server is capable of taking right now. For example if the number is 5 then it means there are 5 threads sitting idle ready to take a request. If one request comes in, then the value would be 4 until it finishes processing. If the minimum threads allowed is zero, this number will still have a maximum value of the maximum threads allowed.
61
+ * max_threads: the maximum number of threads puma is configured to spool up per worker
62
+ * requests_count: the number of requests this worker has served since starting
63
+
64
+
65
+ ### cluster mode
66
+
67
+ * phase: which phase of restart the process is in, during [phased restart](https://github.com/puma/puma/blob/master/docs/restart.md)
68
+ * workers: ??
69
+ * booted_workers: how many workers currently running?
70
+ * old_workers: ??
71
+ * worker_status: array of hashes of info for each worker (see below)
72
+
73
+ ### worker status
74
+
75
+ * started_at: when the worker was started
76
+ * pid: the process id of the worker process
77
+ * index: each worker gets a number. if puma is configured to have 3 workers, then this will be 0, 1, or 2
78
+ * booted: if it's done booting [?]
79
+ * last_checkin: Last time the worker responded to the master process' heartbeat check.
80
+ * last_status: a hash of info about the worker's state handling requests. See the explanation for this in "single mode and individual workers in cluster mode" section above.
81
+
82
+
83
+ ## Examples
84
+
85
+ Here are two example stats hashes produced by `Puma.stats`:
86
+
87
+ ### single
88
+
89
+ ```json
90
+ {
91
+ "started_at": "2021-01-14T07:12:35Z",
92
+ "backlog": 0,
93
+ "running": 5,
94
+ "pool_capacity": 5,
95
+ "max_threads": 5,
96
+ "requests_count": 3
97
+ }
98
+ ```
99
+
100
+ ### cluster
101
+
102
+ ```json
103
+ {
104
+ "started_at": "2021-01-14T07:09:17Z",
105
+ "workers": 2,
106
+ "phase": 0,
107
+ "booted_workers": 2,
108
+ "old_workers": 0,
109
+ "worker_status": [
110
+ {
111
+ "started_at": "2021-01-14T07:09:24Z",
112
+ "pid": 64136,
113
+ "index": 0,
114
+ "phase": 0,
115
+ "booted": true,
116
+ "last_checkin": "2021-01-14T07:11:09Z",
117
+ "last_status": {
118
+ "backlog": 0,
119
+ "running": 5,
120
+ "pool_capacity": 5,
121
+ "max_threads": 5,
122
+ "requests_count": 2
123
+ }
124
+ },
125
+ {
126
+ "started_at": "2021-01-14T07:09:24Z",
127
+ "pid": 64137,
128
+ "index": 1,
129
+ "phase": 0,
130
+ "booted": true,
131
+ "last_checkin": "2021-01-14T07:11:09Z",
132
+ "last_status": {
133
+ "backlog": 0,
134
+ "running": 5,
135
+ "pool_capacity": 5,
136
+ "max_threads": 5,
137
+ "requests_count": 1
138
+ }
139
+ }
140
+ ]
141
+ }
142
+ ```
@@ -22,6 +22,20 @@ unless ENV["DISABLE_SSL"]
22
22
  # below are yes for 1.1.0 & later
23
23
  have_func "TLS_server_method" , "openssl/ssl.h"
24
24
  have_func "SSL_CTX_set_min_proto_version(NULL, 0)", "openssl/ssl.h"
25
+
26
+ have_func "X509_STORE_up_ref"
27
+ have_func("SSL_CTX_set_ecdh_auto(NULL, 0)", "openssl/ssl.h")
28
+ end
29
+ end
30
+
31
+ if ENV["MAKE_WARNINGS_INTO_ERRORS"]
32
+ # Make all warnings into errors
33
+ # Except `implicit-fallthrough` since most failures comes from ragel state machine generated code
34
+ if respond_to? :append_cflags
35
+ append_cflags config_string 'WERRORFLAG'
36
+ append_cflags '-Wno-implicit-fallthrough'
37
+ else
38
+ $CFLAGS += ' ' << (config_string 'WERRORFLAG') << ' -Wno-implicit-fallthrough'
25
39
  end
26
40
  end
27
41