1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

fork_worker does not work with preload_app! (#2468)

Related to #2466
Close #2467

[ci skip]
This commit is contained in:
Patrik Ragnarsson 2020-10-29 14:05:13 +01:00 committed by GitHub
parent 61c6213fba
commit f0dffd4d78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -68,7 +68,7 @@ Puma 5 introduces an experimental new cluster-mode configuration option, `fork_w
10004 \_ puma: cluster worker 3: 10000 [puma]
```
This allows the usage of `preload` with `phased_restart`. It also may improve memory usage because the worker process loads additional code after processing requests.
It is compatible with phased restarts. It also may improve memory usage because the worker process loads additional code after processing requests.
To learn more about using `refork` and `fork_worker`, see [the documentation](https://github.com/puma/puma/blob/master/docs/fork_worker.md).

View file

@ -24,6 +24,8 @@ Similar to the `preload_app!` option, the `fork_worker` option allows your appli
### Limitations
- Not compatible with the `preload_app!` option
- This mode is still very experimental so there may be bugs or edge-cases, particularly around expected behavior of existing hooks. Please open a [bug report](https://github.com/puma/puma/issues/new?template=bug_report.md) if you encounter any issues.
- In order to fork new workers cleanly, worker 0 shuts down its server and stops serving requests so there are no open file descriptors or other kinds of shared global state between processes, and to maximize copy-on-write efficiency across the newly-forked workers. This may temporarily reduce total capacity of the cluster during a phased restart / refork.