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 2022/04/15 09:54:44 UTC
[GitHub] [apisix] 123libohan opened a new issue, #6861: Request error:" recv() failed (104: Connection reset by peer) while reading response header from upstream"
123libohan opened a new issue, #6861:
URL: https://github.com/apache/apisix/issues/6861
### Description
When a request is made through the gateway, an error log is found as follows:
`2022/04/15 16:23:24 [error] 363970#0: *1337136 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 10.xx.xxxx.xx, server: _, request: "POST /xxx/xxxx HTTP/1.1", upstream: "http://10.xxx.xx.xxx:8080/xxxx/xxxxx", host: "xxxx.com.cn:9080"`
After consulting the data, we modified the configuration of config-default.yaml , and added the configuration 'http_configuration_snippet' as follows
`client_body_buffer_size 100m;
client_header_buffer_size 100m;
proxy_buffers 4 10m;
proxy_busy_buffers_size 10m;`
But it still doesn't work.
What can be done to solve this problem? Looking forward to reply, Thanks a lot.
### Environment
- APISIX version (2.13.0):
- OpenResty (1.19.9.1):
- etcd version, 3.4.0
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #6861: Request error:" recv() failed (104: Connection reset by peer) while reading response header from upstream"
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #6861:
URL: https://github.com/apache/apisix/issues/6861#issuecomment-1101003021
In my experience, you need to pay attention to the HTTP and TCP timeouts of the upstream services. They should be greater than the timeouts configured in APISIX.
And, this issue is not related to APISIX, you need to focus on the stability of the upstream server.
--
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] kwanhur commented on issue #6861: Request error:" recv() failed (104: Connection reset by peer) while reading response header from upstream"
Posted by GitBox <gi...@apache.org>.
kwanhur commented on issue #6861:
URL: https://github.com/apache/apisix/issues/6861#issuecomment-1101423319
> Here's another error: `2022/04/15 17:45:45 [error] 363993#0: *6641416 upstream prematurely closed connection while reading response header from upstream, client: 10.xxx.xx.xxxx, server: _, request: "POST /atip/tc HTTP/1.1", upstream: "http://10.xxx.xx.xxx:8080/atip/tc", host: "xxxxx.com.cn:9080"`
This had told us that upstream server had closed the TCP connection while APISIX reading response header.
You should capture packets to show the total connection communication.
--
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] kwanhur commented on issue #6861: Request error:" recv() failed (104: Connection reset by peer) while reading response header from upstream"
Posted by GitBox <gi...@apache.org>.
kwanhur commented on issue #6861:
URL: https://github.com/apache/apisix/issues/6861#issuecomment-1105194980
Another work around solution with [proxy_next_upstream](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream) plus [proxy_next_upstream_tries](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream_tries).
I'm not sure which APISIX plugin could retrieve it. 😂
--
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] 123libohan commented on issue #6861: Request error:" recv() failed (104: Connection reset by peer) while reading response header from upstream"
Posted by GitBox <gi...@apache.org>.
123libohan commented on issue #6861:
URL: https://github.com/apache/apisix/issues/6861#issuecomment-1104683597
>
Thanks.It is true that the upstream server closed the TCP connection,and we have resolved this issue by extending the timeout period of the upstream services greater than the timeouts configured in APISIX.
--
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] 123libohan commented on issue #6861: Request error:" recv() failed (104: Connection reset by peer) while reading response header from upstream"
Posted by GitBox <gi...@apache.org>.
123libohan commented on issue #6861:
URL: https://github.com/apache/apisix/issues/6861#issuecomment-1104681671
> In my experience, you need to pay attention to the HTTP and TCP timeouts of the upstream services. They should be greater than the timeouts configured in APISIX.
>
> And, this issue is not related to APISIX, you need to focus on the stability of the upstream server.
Thank you very much . We have resolved this issue by extending the timeout period with upstream
--
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 closed issue #6861: Request error:" recv() failed (104: Connection reset by peer) while reading response header from upstream"
Posted by GitBox <gi...@apache.org>.
tzssangglass closed issue #6861: Request error:" recv() failed (104: Connection reset by peer) while reading response header from upstream"
URL: https://github.com/apache/apisix/issues/6861
--
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] whioue commented on issue #6861: Request error:" recv() failed (104: Connection reset by peer) while reading response header from upstream"
Posted by GitBox <gi...@apache.org>.
whioue commented on issue #6861:
URL: https://github.com/apache/apisix/issues/6861#issuecomment-1236237211
> 根据我的经验,您需要注意上游服务的 HTTP 和 TCP 超时。它们应该大于 APISIX 中配置的超时时间。
>
> 并且,这个问题与 APISIX 无关,需要关注上游服务器的稳定性。
请问APISIX中配置的超时时间指的是哪个配置?是apisix在upstream中配置的连接、读、写超时时间还是在nginx.conf中配置的keepalived_timeout?
--
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] 123libohan commented on issue #6861: Request error:" recv() failed (104: Connection reset by peer) while reading response header from upstream"
Posted by GitBox <gi...@apache.org>.
123libohan commented on issue #6861:
URL: https://github.com/apache/apisix/issues/6861#issuecomment-1100022667
Here's another error:
`2022/04/15 17:45:45 [error] 363993#0: *6641416 upstream prematurely closed connection while reading response header from upstream, client: 10.xxx.xx.xxxx, server: _, request: "POST /atip/tc HTTP/1.1", upstream: "http://10.xxx.xx.xxx:8080/atip/tc", host: "xxxxx.com.cn:9080"`
Hope to help to see how to solve,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