You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/10/28 02:44:03 UTC
[GitHub] [apisix] zhendongcmss opened a new issue #5347: bug: disable proxy_buffering doesn't work
zhendongcmss opened a new issue #5347:
URL: https://github.com/apache/apisix/issues/5347
### Issue description
upsteam is cepg rgw endpoint. apisix doesn't send data to upsteam when upload big file.
Ctrl - C abort the upload command. the file is 1G and already upload 60%, but upstream doesn't received any data. apisix cache the data.
```
[root@node3 zhendong]# s3cmd put 1G-1234567890 ls s3://onest-k8s/fake --disable-multipart
upload: '1G-1234567890' -> 's3://onest-k8s/fake' [1 of 1]
701235200 of 1073741824 65% in 5s 121.13 MB/s^CSee ya!
```
### Environment
- apisix version (cmd: `apisix version`): 2.7
- OS (cmd: `uname -a`):
- OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
- etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
- apisix-dashboard version, if have:
- the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
- luarocks version, if the issue is about installation (cmd: `luarocks --version`):
### Steps to reproduce
confi.yaml
```
proxy_buffering: "off" # Enables or disables buffering of responses from the proxied server.
proxy_request_buffering: "off" # Enables or disables buffering of a client request body.
proxy_http_version: 1.1
client_max_body_size: 0
client_body_postpone_size: 0
```
routes
```
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
{
"uri": "/*",
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:8881": 1
}
}
}'
```
### Actual result
access.log
access_log_format: "$remote_addr - $remote_user [$fmt_ms_time_local] $http_host \"$request\" $status $body_bytes_sent $content_length $request_time \"$http_referer\" \"$http_user_agent\" $http_x_request_id $http_x_amz_target $upstream_addr $upstream_status $upstream_connect_time $upstream_header_time $upstream_response_time"
127.0.0.1 - - [2021-10-27 14:27:36.004] 127.0.0.1:9080 "PUT /onest-k8s/fake HTTP/1.1" 400 0 1073741824 2.347 "-" "-" - - - - - - -
### Error log
no
### Expected result
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] zhendongcmss commented on issue #5347: bug: disable proxy_buffering doesn't work
Posted by GitBox <gi...@apache.org>.
zhendongcmss commented on issue #5347:
URL: https://github.com/apache/apisix/issues/5347#issuecomment-953596450
nginx doc http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_request_buffering
> When HTTP/1.1 chunked transfer encoding is used to send the original request body, the request body will be buffered regardless of the directive value unless HTTP/1.1 is enabled for proxying.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] zhendongcmss commented on issue #5347: bug: disable proxy_buffering doesn't work
Posted by GitBox <gi...@apache.org>.
zhendongcmss commented on issue #5347:
URL: https://github.com/apache/apisix/issues/5347#issuecomment-953455166
From the access.log, although upload is 60%, but apsisix doesn't select any upsteam to proxying.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] zhendongcmss commented on issue #5347: bug: disable proxy_buffering doesn't work
Posted by GitBox <gi...@apache.org>.
zhendongcmss commented on issue #5347:
URL: https://github.com/apache/apisix/issues/5347#issuecomment-953595800
> what `proxy_request_buffering` in `conf/nginx.conf`?
Here is the nginx.conf generated by config.yaml
```
proxy_http_version 1.1;
proxy_set_header Host $upstream_host;
proxy_set_header Upgrade $upstream_upgrade;
proxy_set_header Connection $upstream_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass_header Date;
proxy_buffering off;
proxy_request_buffering off;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tokers commented on issue #5347: bug: disable proxy_buffering doesn't work
Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5347:
URL: https://github.com/apache/apisix/issues/5347#issuecomment-953692524
@zhendongcmss Could you capture some packets so that we can know whether APISIX sends data to upstream and see in which step the uploading is stucked.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander closed issue #5347: bug: disable proxy_buffering doesn't work
Posted by GitBox <gi...@apache.org>.
spacewander closed issue #5347:
URL: https://github.com/apache/apisix/issues/5347
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] fracarvic commented on issue #5347: bug: disable proxy_buffering doesn't work
Posted by GitBox <gi...@apache.org>.
fracarvic commented on issue #5347:
URL: https://github.com/apache/apisix/issues/5347#issuecomment-970580303
I'm experiencing the same issue described here. When uploading big files (several GB) to a webdav upstream service, apisix always write the file to disk in "client_body_temp" folder befor sendint to upstream. I tried the config "proxy_request_buffering off" in "http_server_configuration_snippet" but no luck.
But now, if I disable "proxy-mirror" plugin in config like @nic-6443 said, the big file is not writen to "client_body_temp" folder, it's streamed to upstream.
Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] zhendongcmss edited a comment on issue #5347: bug: disable proxy_buffering doesn't work
Posted by GitBox <gi...@apache.org>.
zhendongcmss edited a comment on issue #5347:
URL: https://github.com/apache/apisix/issues/5347#issuecomment-953596450
nginx doc http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_request_buffering
> When HTTP/1.1 chunked transfer encoding is used to send the original request body, the request body will be buffered regardless of the directive value unless HTTP/1.1 is enabled for proxying.
Actually, enable HTTP 1.1 doesn't work too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] zhendongcmss edited a comment on issue #5347: bug: disable proxy_buffering doesn't work
Posted by GitBox <gi...@apache.org>.
zhendongcmss edited a comment on issue #5347:
URL: https://github.com/apache/apisix/issues/5347#issuecomment-953455591
maybe help:
https://github.com/alibaba/tengine/issues/862
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] zhendongcmss commented on issue #5347: bug: disable proxy_buffering doesn't work
Posted by GitBox <gi...@apache.org>.
zhendongcmss commented on issue #5347:
URL: https://github.com/apache/apisix/issues/5347#issuecomment-953455591
reference:
https://github.com/alibaba/tengine/issues/862
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #5347: bug: disable proxy_buffering doesn't work
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5347:
URL: https://github.com/apache/apisix/issues/5347#issuecomment-953539191
what `proxy_request_buffering` in `conf/nginx.conf`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] nic-6443 commented on issue #5347: bug: disable proxy_buffering doesn't work
Posted by GitBox <gi...@apache.org>.
nic-6443 commented on issue #5347:
URL: https://github.com/apache/apisix/issues/5347#issuecomment-968201045
@zhendongcmss Check if the proxy-mirror plugin is enabled(by default will enable). If this plugin is enabled, apisix adds the mirror directive in "/" location, which will cause `proxy_request_buffering off;` to be disabled.
```
{% if enabled_plugins["proxy-mirror"] then %}
mirror /proxy_mirror;
{% end %}
```
http://nginx.org/en/docs/http/ngx_http_mirror_module.html
> Indicates whether the client request body is mirrored. When enabled, the client request body will be read prior to creating mirror subrequests. In this case, unbuffered client request body proxying set by the proxy_request_buffering, fastcgi_request_buffering, scgi_request_buffering, and uwsgi_request_buffering directives will be disabled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org