We are seeing intermittently
upstream prematurely closed connection while reading response header from upstream, client: 10.244.7.1, server: kong, request: “POST /v1/m4/api/payments/payment/methods/validate HTTP/1.1”, upstream.
We are seeing this for both GET and POST. GET call is retrying and success, but POST it is not retrying in kong even after we put retry value to 5.
Can always try higher timeouts like that stack article said but I don’t believe that will help, essentially NGINX is reporting the upstream server closed the connection too soon, a multitude of reasons could cause that but looking into the back-end service will yield better results, maybe do a tcp dump and packet capture of your Kong and API service and analyze it and the frequency they occur. I would say its not uncommon to see this happening like .01% of the time in networking.
Thanks for the reply.
Earlier we were using mulesoft as the API gateway and we never noticed these kind of issues. Once we replaced with kong we are seeing this exception intermittently.
There is no change in the upstream servers.