Skip to content

Commit 2d27225

Browse files
tilnateberkopec
authored andcommitted
Note symlink mechanism in restart documentation for hot restart (#3298)
[ci skip]
1 parent b747a65 commit 2d27225

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/restart.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Any of the following will cause a Puma server to perform a hot restart:
2727

2828
### Additional notes
2929

30+
* The newly started Puma process changes its current working directory to the directory specified by the `directory` option. If `directory` is set to symlink, this is automatically re-evaluated, so this mechanism can be used to upgrade the application.
3031
* Only one version of the application is running at a time.
3132
* `on_restart` is invoked just before the server shuts down. This can be used to clean up resources (like long-lived database connections) gracefully. Since Ruby 2.0, it is not typically necessary to explicitly close file descriptors on restart. This is because any file descriptor opened by Ruby will have the `FD_CLOEXEC` flag set, meaning that file descriptors are closed on `exec`. `on_restart` is useful, though, if your application needs to perform any more graceful protocol-specific shutdown procedures before closing connections.
3233

0 commit comments

Comments
 (0)