Skip to content

Commit

Permalink
Note symlink mechanism in restart documentation for hot restart (#3298)
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
til authored and nateberkopec committed Jan 2, 2024
1 parent 40ce4d7 commit 171b17c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/restart.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Any of the following will cause a Puma server to perform a hot restart:

### Additional notes

* 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.
* Only one version of the application is running at a time.
* `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.

Expand Down

0 comments on commit 171b17c

Please sign in to comment.