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.
Files changed (98) hide show
  1. checksums.yaml +5 -5
  2. data/History.md +2092 -422
  3. data/LICENSE +23 -20
  4. data/README.md +301 -69
  5. data/bin/puma-wild +3 -9
  6. data/docs/architecture.md +59 -21
  7. data/docs/compile_options.md +55 -0
  8. data/docs/deployment.md +69 -58
  9. data/docs/fork_worker.md +41 -0
  10. data/docs/java_options.md +54 -0
  11. data/docs/jungle/README.md +9 -0
  12. data/docs/jungle/rc.d/README.md +74 -0
  13. data/docs/jungle/rc.d/puma +61 -0
  14. data/docs/jungle/rc.d/puma.conf +10 -0
  15. data/docs/kubernetes.md +78 -0
  16. data/docs/nginx.md +2 -2
  17. data/docs/plugins.md +26 -12
  18. data/docs/rails_dev_mode.md +28 -0
  19. data/docs/restart.md +48 -22
  20. data/docs/signals.md +13 -11
  21. data/docs/stats.md +147 -0
  22. data/docs/systemd.md +108 -117
  23. data/docs/testing_benchmarks_local_files.md +150 -0
  24. data/docs/testing_test_rackup_ci_files.md +36 -0
  25. data/ext/puma_http11/PumaHttp11Service.java +2 -2
  26. data/ext/puma_http11/ext_help.h +1 -1
  27. data/ext/puma_http11/extconf.rb +68 -3
  28. data/ext/puma_http11/http11_parser.c +106 -118
  29. data/ext/puma_http11/http11_parser.h +2 -2
  30. data/ext/puma_http11/http11_parser.java.rl +22 -38
  31. data/ext/puma_http11/http11_parser.rl +6 -4
  32. data/ext/puma_http11/http11_parser_common.rl +6 -6
  33. data/ext/puma_http11/mini_ssl.c +474 -94
  34. data/ext/puma_http11/no_ssl/PumaHttp11Service.java +15 -0
  35. data/ext/puma_http11/org/jruby/puma/Http11.java +136 -121
  36. data/ext/puma_http11/org/jruby/puma/Http11Parser.java +84 -99
  37. data/ext/puma_http11/org/jruby/puma/MiniSSL.java +251 -88
  38. data/ext/puma_http11/puma_http11.c +53 -58
  39. data/lib/puma/app/status.rb +71 -49
  40. data/lib/puma/binder.rb +257 -151
  41. data/lib/puma/cli.rb +61 -38
  42. data/lib/puma/client.rb +464 -224
  43. data/lib/puma/cluster/worker.rb +183 -0
  44. data/lib/puma/cluster/worker_handle.rb +96 -0
  45. data/lib/puma/cluster.rb +343 -239
  46. data/lib/puma/commonlogger.rb +23 -14
  47. data/lib/puma/configuration.rb +144 -96
  48. data/lib/puma/const.rb +194 -115
  49. data/lib/puma/control_cli.rb +135 -81
  50. data/lib/puma/detect.rb +34 -2
  51. data/lib/puma/dsl.rb +1092 -153
  52. data/lib/puma/error_logger.rb +113 -0
  53. data/lib/puma/events.rb +17 -111
  54. data/lib/puma/io_buffer.rb +44 -5
  55. data/lib/puma/jruby_restart.rb +2 -73
  56. data/lib/puma/json_serialization.rb +96 -0
  57. data/lib/puma/launcher/bundle_pruner.rb +104 -0
  58. data/lib/puma/launcher.rb +205 -138
  59. data/lib/puma/log_writer.rb +147 -0
  60. data/lib/puma/minissl/context_builder.rb +96 -0
  61. data/lib/puma/minissl.rb +279 -70
  62. data/lib/puma/null_io.rb +61 -2
  63. data/lib/puma/plugin/systemd.rb +90 -0
  64. data/lib/puma/plugin/tmp_restart.rb +3 -1
  65. data/lib/puma/plugin.rb +9 -13
  66. data/lib/puma/rack/builder.rb +10 -11
  67. data/lib/puma/rack/urlmap.rb +3 -1
  68. data/lib/puma/rack_default.rb +21 -4
  69. data/lib/puma/reactor.rb +97 -185
  70. data/lib/puma/request.rb +688 -0
  71. data/lib/puma/runner.rb +114 -69
  72. data/lib/puma/sd_notify.rb +146 -0
  73. data/lib/puma/server.rb +409 -704
  74. data/lib/puma/single.rb +29 -72
  75. data/lib/puma/state_file.rb +48 -9
  76. data/lib/puma/thread_pool.rb +234 -93
  77. data/lib/puma/util.rb +23 -10
  78. data/lib/puma.rb +68 -5
  79. data/lib/rack/handler/puma.rb +119 -86
  80. data/tools/Dockerfile +16 -0
  81. data/tools/trickletest.rb +0 -1
  82. metadata +55 -33
  83. data/ext/puma_http11/io_buffer.c +0 -155
  84. data/lib/puma/accept_nonblock.rb +0 -23
  85. data/lib/puma/compat.rb +0 -14
  86. data/lib/puma/convenient.rb +0 -23
  87. data/lib/puma/daemon_ext.rb +0 -31
  88. data/lib/puma/delegation.rb +0 -11
  89. data/lib/puma/java_io_buffer.rb +0 -45
  90. data/lib/puma/rack/backports/uri/common_193.rb +0 -33
  91. data/lib/puma/tcp_logger.rb +0 -39
  92. data/tools/jungle/README.md +0 -13
  93. data/tools/jungle/init.d/README.md +0 -59
  94. data/tools/jungle/init.d/puma +0 -421
  95. data/tools/jungle/init.d/run-puma +0 -18
  96. data/tools/jungle/upstart/README.md +0 -61
  97. data/tools/jungle/upstart/puma-manager.conf +0 -31
  98. 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