puma 3.11.1 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/History.md +2092 -422
- data/LICENSE +23 -20
- data/README.md +301 -69
- data/bin/puma-wild +3 -9
- data/docs/architecture.md +59 -21
- data/docs/compile_options.md +55 -0
- data/docs/deployment.md +69 -58
- data/docs/fork_worker.md +41 -0
- data/docs/java_options.md +54 -0
- data/docs/jungle/README.md +9 -0
- data/docs/jungle/rc.d/README.md +74 -0
- data/docs/jungle/rc.d/puma +61 -0
- data/docs/jungle/rc.d/puma.conf +10 -0
- data/docs/kubernetes.md +78 -0
- data/docs/nginx.md +2 -2
- data/docs/plugins.md +26 -12
- data/docs/rails_dev_mode.md +28 -0
- data/docs/restart.md +48 -22
- data/docs/signals.md +13 -11
- data/docs/stats.md +147 -0
- data/docs/systemd.md +108 -117
- data/docs/testing_benchmarks_local_files.md +150 -0
- data/docs/testing_test_rackup_ci_files.md +36 -0
- data/ext/puma_http11/PumaHttp11Service.java +2 -2
- data/ext/puma_http11/ext_help.h +1 -1
- data/ext/puma_http11/extconf.rb +68 -3
- data/ext/puma_http11/http11_parser.c +106 -118
- data/ext/puma_http11/http11_parser.h +2 -2
- data/ext/puma_http11/http11_parser.java.rl +22 -38
- data/ext/puma_http11/http11_parser.rl +6 -4
- data/ext/puma_http11/http11_parser_common.rl +6 -6
- data/ext/puma_http11/mini_ssl.c +474 -94
- data/ext/puma_http11/no_ssl/PumaHttp11Service.java +15 -0
- data/ext/puma_http11/org/jruby/puma/Http11.java +136 -121
- data/ext/puma_http11/org/jruby/puma/Http11Parser.java +84 -99
- data/ext/puma_http11/org/jruby/puma/MiniSSL.java +251 -88
- data/ext/puma_http11/puma_http11.c +53 -58
- data/lib/puma/app/status.rb +71 -49
- data/lib/puma/binder.rb +257 -151
- data/lib/puma/cli.rb +61 -38
- data/lib/puma/client.rb +464 -224
- data/lib/puma/cluster/worker.rb +183 -0
- data/lib/puma/cluster/worker_handle.rb +96 -0
- data/lib/puma/cluster.rb +343 -239
- data/lib/puma/commonlogger.rb +23 -14
- data/lib/puma/configuration.rb +144 -96
- data/lib/puma/const.rb +194 -115
- data/lib/puma/control_cli.rb +135 -81
- data/lib/puma/detect.rb +34 -2
- data/lib/puma/dsl.rb +1092 -153
- data/lib/puma/error_logger.rb +113 -0
- data/lib/puma/events.rb +17 -111
- data/lib/puma/io_buffer.rb +44 -5
- data/lib/puma/jruby_restart.rb +2 -73
- data/lib/puma/json_serialization.rb +96 -0
- data/lib/puma/launcher/bundle_pruner.rb +104 -0
- data/lib/puma/launcher.rb +205 -138
- data/lib/puma/log_writer.rb +147 -0
- data/lib/puma/minissl/context_builder.rb +96 -0
- data/lib/puma/minissl.rb +279 -70
- data/lib/puma/null_io.rb +61 -2
- data/lib/puma/plugin/systemd.rb +90 -0
- data/lib/puma/plugin/tmp_restart.rb +3 -1
- data/lib/puma/plugin.rb +9 -13
- data/lib/puma/rack/builder.rb +10 -11
- data/lib/puma/rack/urlmap.rb +3 -1
- data/lib/puma/rack_default.rb +21 -4
- data/lib/puma/reactor.rb +97 -185
- data/lib/puma/request.rb +688 -0
- data/lib/puma/runner.rb +114 -69
- data/lib/puma/sd_notify.rb +146 -0
- data/lib/puma/server.rb +409 -704
- data/lib/puma/single.rb +29 -72
- data/lib/puma/state_file.rb +48 -9
- data/lib/puma/thread_pool.rb +234 -93
- data/lib/puma/util.rb +23 -10
- data/lib/puma.rb +68 -5
- data/lib/rack/handler/puma.rb +119 -86
- data/tools/Dockerfile +16 -0
- data/tools/trickletest.rb +0 -1
- metadata +55 -33
- data/ext/puma_http11/io_buffer.c +0 -155
- data/lib/puma/accept_nonblock.rb +0 -23
- data/lib/puma/compat.rb +0 -14
- data/lib/puma/convenient.rb +0 -23
- data/lib/puma/daemon_ext.rb +0 -31
- data/lib/puma/delegation.rb +0 -11
- data/lib/puma/java_io_buffer.rb +0 -45
- data/lib/puma/rack/backports/uri/common_193.rb +0 -33
- data/lib/puma/tcp_logger.rb +0 -39
- data/tools/jungle/README.md +0 -13
- data/tools/jungle/init.d/README.md +0 -59
- data/tools/jungle/init.d/puma +0 -421
- data/tools/jungle/init.d/run-puma +0 -18
- data/tools/jungle/upstart/README.md +0 -61
- data/tools/jungle/upstart/puma-manager.conf +0 -31
- data/tools/jungle/upstart/puma.conf +0 -69
@@ -1,31 +0,0 @@
|
|
1
|
-
# /etc/init/puma-manager.conf - manage a set of Pumas
|
2
|
-
|
3
|
-
# This example config should work with Ubuntu 12.04+. It
|
4
|
-
# allows you to manage multiple Puma instances with
|
5
|
-
# Upstart, Ubuntu's native service management tool.
|
6
|
-
#
|
7
|
-
# See puma.conf for how to manage a single Puma instance.
|
8
|
-
#
|
9
|
-
# Use "stop puma-manager" to stop all Puma instances.
|
10
|
-
# Use "start puma-manager" to start all instances.
|
11
|
-
# Use "restart puma-manager" to restart all instances.
|
12
|
-
# Crazy, right?
|
13
|
-
#
|
14
|
-
|
15
|
-
description "Manages the set of puma processes"
|
16
|
-
|
17
|
-
# This starts upon bootup and stops on shutdown
|
18
|
-
start on runlevel [2345]
|
19
|
-
stop on runlevel [06]
|
20
|
-
|
21
|
-
# Set this to the number of Puma processes you want
|
22
|
-
# to run on this machine
|
23
|
-
env PUMA_CONF="/etc/puma.conf"
|
24
|
-
|
25
|
-
pre-start script
|
26
|
-
for i in `cat $PUMA_CONF`; do
|
27
|
-
app=`echo $i | cut -d , -f 1`
|
28
|
-
logger -t "puma-manager" "Starting $app"
|
29
|
-
start puma app=$app
|
30
|
-
done
|
31
|
-
end script
|
@@ -1,69 +0,0 @@
|
|
1
|
-
# /etc/init/puma.conf - Puma config
|
2
|
-
|
3
|
-
# This example config should work with Ubuntu 12.04+. It
|
4
|
-
# allows you to manage multiple Puma instances with
|
5
|
-
# Upstart, Ubuntu's native service management tool.
|
6
|
-
#
|
7
|
-
# See puma-manager.conf for how to manage all Puma instances at once.
|
8
|
-
#
|
9
|
-
# Save this config as /etc/init/puma.conf then manage puma with:
|
10
|
-
# sudo start puma app=PATH_TO_APP
|
11
|
-
# sudo stop puma app=PATH_TO_APP
|
12
|
-
# sudo status puma app=PATH_TO_APP
|
13
|
-
#
|
14
|
-
# or use the service command:
|
15
|
-
# sudo service puma {start,stop,restart,status}
|
16
|
-
#
|
17
|
-
|
18
|
-
description "Puma Background Worker"
|
19
|
-
|
20
|
-
# no "start on", we don't want to automatically start
|
21
|
-
stop on (stopping puma-manager or runlevel [06])
|
22
|
-
|
23
|
-
# change apps to match your deployment user if you want to use this as a less privileged user (recommended!)
|
24
|
-
setuid apps
|
25
|
-
setgid apps
|
26
|
-
|
27
|
-
respawn
|
28
|
-
respawn limit 3 30
|
29
|
-
|
30
|
-
instance ${app}
|
31
|
-
|
32
|
-
script
|
33
|
-
# this script runs in /bin/sh by default
|
34
|
-
# respawn as bash so we can source in rbenv/rvm
|
35
|
-
# quoted heredoc to tell /bin/sh not to interpret
|
36
|
-
# variables
|
37
|
-
|
38
|
-
# source ENV variables manually as Upstart doesn't, eg:
|
39
|
-
#. /etc/environment
|
40
|
-
|
41
|
-
exec /bin/bash <<'EOT'
|
42
|
-
# set HOME to the setuid user's home, there doesn't seem to be a better, portable way
|
43
|
-
export HOME="$(eval echo ~$(id -un))"
|
44
|
-
|
45
|
-
if [ -d "/usr/local/rbenv/bin" ]; then
|
46
|
-
export PATH="/usr/local/rbenv/bin:/usr/local/rbenv/shims:$PATH"
|
47
|
-
elif [ -d "$HOME/.rbenv/bin" ]; then
|
48
|
-
export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
|
49
|
-
elif [ -f /etc/profile.d/rvm.sh ]; then
|
50
|
-
source /etc/profile.d/rvm.sh
|
51
|
-
elif [ -f /usr/local/rvm/scripts/rvm ]; then
|
52
|
-
source /etc/profile.d/rvm.sh
|
53
|
-
elif [ -f "$HOME/.rvm/scripts/rvm" ]; then
|
54
|
-
source "$HOME/.rvm/scripts/rvm"
|
55
|
-
elif [ -f /usr/local/share/chruby/chruby.sh ]; then
|
56
|
-
source /usr/local/share/chruby/chruby.sh
|
57
|
-
if [ -f /usr/local/share/chruby/auto.sh ]; then
|
58
|
-
source /usr/local/share/chruby/auto.sh
|
59
|
-
fi
|
60
|
-
# if you aren't using auto, set your version here
|
61
|
-
# chruby 2.0.0
|
62
|
-
fi
|
63
|
-
|
64
|
-
cd $app
|
65
|
-
logger -t puma "Starting server: $app"
|
66
|
-
|
67
|
-
exec bundle exec puma -C config/puma.rb
|
68
|
-
EOT
|
69
|
-
end script
|