ngx_http_proxy_connect_module
ngx_http_proxy_connect_module copied to clipboard
CONNECT METHOD data not recognized as client-body
Actually I am trying to resolve the error messages like these:
upstream read timed out (peer:xxx.xxx.xxx.xxx:443) while connecting to upstream
client read timed out while connecting to upstream, client: xx.xx.xx.xx
upstream read error could easily be resolved by
proxy_connect_read_timeout 600s;
proxy_connect_send_timeout 600s;
but it is hard to find way to resolve the client read after investigating nginx conf directives, finally found a magic directive
client_body_timeout 600s;
the default value of client_body_timeout is set to 60. No matter how many data transferred through CONNECT METHOD, no bits was count to client-body. As a result, if a connect method is longer than 60s, error occurs.
Hmm, the easiest solution is put
client_body_timeout 600s;
in your nginx conf file (I think 600s is quite enough for common usage.)
The long-term solution is wish @chobits could made nginx treat data transfer as client-body.
Yea,this is a legacy.
This module "borrows" client_body_timeout directive currently, we should add new directive for proxy_connect_client_{read|write}_timeout instead.
similar to another issue: https://github.com/chobits/ngx_http_proxy_connect_module/issues/177#issuecomment-774150511
think it resolved. feel free to reopen if u still have the same problem