Open
Conversation
docs/config.md
Outdated
Comment on lines
115
to
119
| If the worker mode is enabled, an additional thread is required to handle the incoming requests, | ||
| so the default `num_threads` value is `1 + 2x(number of available CPUs)`. | ||
|
|
||
| Thus, in that mode if `num_threads` and `num` are explicitly set, `num_threads` must be strictly greater then `num`. | ||
|
|
Contributor
There was a problem hiding this comment.
The additional thread is always started in-reserve to handle any non-worker mode requests. This block probably better fits into worker.md, somewhere here
Author
There was a problem hiding this comment.
correct, I have moved the section to worker.md
019c95f to
ad3b88c
Compare
ad3b88c to
f77eca5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, first PR on that great project.
Having heavily played with configuration in the past weeks, I have noticed using Prometheus metrics frankenphp_total_threads and frankenphp_total_workers that the default value for num_threads changes whether the worker mode is enabled or not.
In other words, with the following restrictions on my compose stack for the FrankenPHP service:
In classic mode : 4 threads are created
In worker mode with "num : 4" : 5 threads are created.
So if you happen to explicity set num_threads, it has to be > that num to ensure the request thread is created, otherwise FKPHP won't start and will output this error message: