From 098dc6838b754539b67e000eaa0ace414947d812 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Thu, 18 Apr 2019 20:34:10 +0200 Subject: [PATCH] Add a note about wrapper scripts and sockets Any wrapper scripts which `exec`, or other indirections in `ExecStart`, may result in activated socket file descriptors being closed before they reach the puma master process. For example, if using `bundle exec`, pass the `--keep-file-descriptors` flag. `bundle exec` can be avoided by using a `puma` executable generated by `bundle binstubs puma`. This commit also remove a couple of trailing whitespaces Ref: #1499 --- docs/systemd.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/systemd.md b/docs/systemd.md index e34f1b08..88944877 100644 --- a/docs/systemd.md +++ b/docs/systemd.md @@ -71,6 +71,13 @@ listening sockets open across puma restarts and achieves graceful restarts, including when upgraded puma, and is compatible with both clustered mode and application preload. +**Note:** Any wrapper scripts which `exec`, or other indirections in +`ExecStart`, may result in activated socket file descriptors being closed +before they reach the puma master process. For example, if using `bundle exec`, +pass the `--keep-file-descriptors` flag. `bundle exec` can be avoided by using a +`puma` executable generated by `bundle binstubs puma`. This is tracked in +[#1499]. + **Note:** Socket activation doesn't currently work on jruby. This is tracked in [#1367]. @@ -254,8 +261,8 @@ Restart=no # `puma_ctl restart` wouldn't work without this. It's because `pumactl` # changes PID on restart and systemd stops the service afterwards -# because of the PID change. This option prevents stopping after PID -# change. +# because of the PID change. This option prevents stopping after PID +# change. RemainAfterExit=yes [Install]