Skip to content
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

feat: customize nginx timeout config #725

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion charts/apisix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ The command removes all the Kubernetes components associated with the chart and
| apisix.nginx.customLuaSharedDicts | list | `[]` | Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings, click [here](https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/values.yaml#L27-L30) to learn the format of a shared dict |
| apisix.nginx.enableCPUAffinity | bool | `true` | |
| apisix.nginx.envs | list | `[]` | |
| apisix.nginx.keepaliveTimeout | string | `"60s"` | Timeout during which a keep-alive client connection will stay open on the server side. |
| apisix.nginx.keepaliveTimeout | string | `60s` | Timeout during which a keep-alive client connection will stay open on the server side. |
| apisix.nginx.clientHeaderTimeout | string | `60s` | Timeout for reading client request header, then 408 (Request Time-out) error is returned to the client. |
| apisix.nginx.clientBodyTimeout | string | `60s` | Timeout for reading client request body, then 408 (Request Time-out) error is returned to the client. |
| apisix.nginx.sendTimeout | string | `10s` | Timeout for transmitting a response to the client, then the connection is closed. |
| apisix.nginx.logs.accessLog | string | `"/dev/stdout"` | Access log path |
| apisix.nginx.logs.accessLogFormat | string | `"$remote_addr - $remote_user [$time_local] $http_host \\\"$request\\\" $status $body_bytes_sent $request_time \\\"$http_referer\\\" \\\"$http_user_agent\\\" $upstream_addr $upstream_status $upstream_response_time \\\"$upstream_scheme://$upstream_host$upstream_uri\\\""` | Access log format |
| apisix.nginx.logs.accessLogFormatEscape | string | `"default"` | Allows setting json or default characters escaping in variables |
Expand Down
8 changes: 4 additions & 4 deletions charts/apisix/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ data:
access_log_format: '{{ .Values.apisix.nginx.logs.accessLogFormat }}'
access_log_format_escape: {{ .Values.apisix.nginx.logs.accessLogFormatEscape }}
{{- end }}
keepalive_timeout: {{ .Values.apisix.nginx.keepaliveTimeout | quote }}
client_header_timeout: 60s # timeout for reading client request header, then 408 (Request Time-out) error is returned to the client
client_body_timeout: 60s # timeout for reading client request body, then 408 (Request Time-out) error is returned to the client
send_timeout: 10s # timeout for transmitting a response to the client.then the connection is closed
keepalive_timeout: {{ .Values.apisix.nginx.keepaliveTimeout }} # timeout during which a keep-alive client connection will stay open on the server side.
client_header_timeout: {{ .Values.apisix.nginx.clientHeaderTimeout }} # timeout for reading client request header, then 408 (Request Time-out) error is returned to the client
client_body_timeout: {{ .Values.apisix.nginx.clientBodyTimeout }} # timeout for reading client request body, then 408 (Request Time-out) error is returned to the client
send_timeout: {{ .Values.apisix.nginx.sendTimeout }} # timeout for transmitting a response to the client, then the connection is closed
underscores_in_headers: "on" # default enables the use of underscores in client request header fields
real_ip_header: "X-Real-IP" # http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header
real_ip_from: # http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from
Expand Down
6 changes: 6 additions & 0 deletions charts/apisix/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,12 @@ apisix:
enableCPUAffinity: true
# -- Timeout during which a keep-alive client connection will stay open on the server side.
keepaliveTimeout: 60s
# -- Timeout for reading client request header, then 408 (Request Time-out) error is returned to the client.
clientHeaderTimeout: 60s
# -- Timeout for reading client request body, then 408 (Request Time-out) error is returned to the client.
clientBodyTimeout: 60s
# -- Timeout for transmitting a response to the client, then the connection is closed.
sendTimeout: 10s
envs: []
# access log and error log configuration
logs:
Expand Down
Loading