1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
Commit graph

31 commits

Author SHA1 Message Date
Yoann Lecuyer
a391634a34
Instrument requests count (#2106)
* Instrument requests count

* Fix existing tests

* Add history

* add new test
2020-02-11 09:47:39 -06:00
Bart
1bec245b63 Change Puma.stats to return a hash instead of a JSON string (#2086)
Having access to the hash allows to produce stats in other ways (such as StatsD) without having to parse JSON of data that is available in memory. An example of this workaround is fa6ba1f507/lib/puma/plugin/statsd.rb (L112-L114)
2019-12-17 12:38:48 +07:00
MSP-Greg
1a484d8d1c Fix Binder @unix_paths handling
1. Move removal to launcher from single and cluster.

2. @unix_paths only contains files that Puma creates (pre-existing files are not)
2019-10-01 08:50:38 -05:00
MSP-Greg
db74ad4ab2 unlink UNIXSocket files, fix Binder#close (#1970) 2019-09-18 11:51:59 +02:00
Yoann Lecuyer
a3e18cb3a6 Instrument start time (#1844)
* Instrument started_at

* clean diff
2019-08-01 12:25:15 -07:00
Evan Phoenix
193674ef7e
Merge pull request #1655 from mipearson/mp-puma-hack
Don't call .stop on a server that doesn't exist
2019-02-19 21:09:00 -08:00
Michael Pearson
148143e974 Don't call .stop on a server that doesn't exist 2018-09-24 14:16:33 +10:00
schneems
88e51fb08e Freeze all the strings!
Reduces runtime allocation by freezing string literals by default.

We could also remove a ton of manual `.freeze` calls, however the ruby supported version is 2.2 and the magic comment only targets 2.3+.
2018-09-17 11:41:14 -05:00
schneems
fb2ca4c17c Add max_threads to Puma.stats
Currently we don’t know the max bound of the `pool_capacity` metric. We know `spawned` which is confusingly under the “running” keyword, however we don’t know if spawned is the highest it will possibly be.

By adding `max_threads` we know the upper bound for `running` threads and therefore the upper bound for pool capacity.

It should be noted that it’s not always guaranteed that puma will always create up to `max_threads`, a separate relationship between `running` and `max_threads` should be monitored as well (if min threads != max threads).
2018-06-29 12:33:18 -05:00
schneems
8b10df8b2b [close #1577] Negative Backpressure Metric
This PR introduces the `pool_capacity` stat which can be used as a “negative back pressure metric”. 

What does a “negative backpressure metric” mean? It means when this number is low, we have a higher amount of backpressure. When it is zero it means that our worker has no ability to process additional requests. This information could be used to scale out by adding additional servers. When that happens the requests should be re-distributed between the extra server and the “pool capacity” number for each individual server should go up.
2018-05-04 12:54:05 -05:00
schneems
c26ebe6101 Doc Puma::Runner, Puma::Single, and Puma::Cluster 2018-05-01 15:44:08 -05:00
MSP-Greg
5a6f3f2b34 Fix stat & TestCLI#test_control_for_tcp (#1470) 2017-12-11 14:05:36 -07:00
Evan Phoenix
5fdf337790 Move puma.rb to just autoloads. Fixes #1063 2016-09-05 11:29:16 -07:00
Evan Phoenix
88cc1b5721 Execute background hooks after daemonizing. Fixes #925 2016-07-24 16:00:57 -07:00
Evan Phoenix
50ccba8a9e Redirect IO in the jruby daemon mode. Fixes #778 2016-07-24 13:56:02 -07:00
Vipul A M
50d1b772f6 rm unused pid 2016-04-07 23:38:53 +05:30
Evan Phoenix
d7c13dd63f Fix jruby daemonization. Fixes #918 2016-03-05 16:28:39 -08:00
Evan Phoenix
f788af0c8f Continue API cleanup, preparing for 3.0 2016-02-06 19:00:29 -08:00
Anna Fowles-Winkler
c20c5fea8d Fix spelling errors. 2015-10-17 11:31:55 -06:00
Evan Phoenix
477f403de9 redirect io right after daemonizing so startup errors are shown. Fixes #359 2014-12-12 17:52:15 -08:00
Evan Phoenix
56084e0967 Load the app in the daemon because it might start threads. Fixes #607 2014-11-24 11:46:32 -08:00
Morton Jonuschat
dcc55fb021 Return success status to the invoking environment
Daemonizing on JRuby returned an error status to the
invoking environment due to exit! defaulting to a
return status of „false“ in constrast to exit which
defaults to „true“.
2013-08-21 07:25:25 +02:00
Evan Phoenix
f4682fb9d6 Keep jruby daemon mode from retrying on a hot restart 2013-08-13 16:05:51 -07:00
Evan Phoenix
6f7fea49df Fix pidfile creation/deletion race on jruby daemonization 2013-08-08 15:48:50 -07:00
Evan Phoenix
86b7d9718d Detect when the jruby daemon child doesn't start properly 2013-07-11 11:46:18 -07:00
Evan Phoenix
c68ea5e46b Move starting control server to after daemonization 2013-07-08 22:36:50 -07:00
Evan Phoenix
e70a370e2d More cleanup 2013-07-05 21:13:29 -07:00
Evan Phoenix
f2e11d1b52 A bit more cleanup 2013-07-05 17:09:18 -07:00
Evan Phoenix
662852ce4f Pass Events around more, add Events#on_booted 2013-07-05 16:54:15 -07:00
Evan Phoenix
c85c30c82e Fix jruby daemonization 2013-07-05 16:53:52 -07:00
Evan Phoenix
c48b804d8f Refactor modes, fix control server to always work 2013-07-05 16:08:13 -07:00