-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert max-worker-connections default value #3660
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aledbf The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I'd be in favor of defining the same default value for Also, the default limit of opened files is 1024 on most systems, so we should avoid using a higher value without checking the limit first, or the user might experience nasty things in production when scaling up. |
|[max-worker-open-files](#max-worker-open-files)|int|0| | ||
|[map-hash-bucket-size](#max-worker-connections)|int|64| | ||
|[map-hash-bucket-size](#max-hash-bucket-szie)|int|64| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|[map-hash-bucket-size](#max-hash-bucket-szie)|int|64| | |
|[map-hash-bucket-size](#max-hash-bucket-size)|int|64| |
How do we define what is an acceptable or non-acceptable default RAM usage? It doesn't seems bad to me that if the server is configured to have a huge maximum of opened files, Nginx leverages that; then if some users want less RAM usage on idle, we could just advise them to reduce If we want to base all the default settings on the available RAM, I feel that it really gets much more difficult. Doing this properly would require a |
Right now, any considerable deviation from what is provided now is not acceptable. Keep in mind many users have CPU/RAM limit in place. A change like this one could break existing deployments Edit: the first part sounds a bit extreme 😄 |
Makes sense. What would you think of 1/ putting that default value on |
@ramnes right now we need to release 0.22. After that, we can try to improve the defaults but only |
If you put 16384 as default for |
As I said, we can review this after the release. Right now I need at least two days in production before releasing a new version. I prefer to revert one default value than changing two. We already know how it behaves with the change in this PR. |
@@ -362,8 +362,10 @@ _References:_ | |||
## max-worker-connections | |||
|
|||
Sets the [maximum number of simultaneous connections](http://nginx.org/en/docs/ngx_core_module.html#worker_connections) that can be opened by each worker process. | |||
The default of 0 uses the value of [max-worker-open-files](#max-worker-open-files). | |||
_**default:**_ 0 | |||
_**default:**_ 16384 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest keeping an explanation on what 0 means, even if it's not the default anymore:
_**default:**_ 16384 | |
0 will use the value of [max-worker-open-files](#max-worker-open-files). | |
_**default:**_ 16384 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. done
What this PR does / why we need it:
Avoid increase of the RAM utilization on idle.