We have a node.js application that runs completely fine on our local system without giving 502 bad gateway. when deployed on the aks cluster which has nginx ingress controller it gives 502 bad gateway on the client end and in logs it shows connection reset by peer error 104.
proxy_body_size of the ingress controller is 50m proxy_read_timeout is 3600 proxy_request_timeout is 3600 proxy_write_timeout is 3600
The Ingress controller works fine with Python Django-based applications.
The error
2023/03/06 07:48:40 [error] 1282#1282: *23111738 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 10.3.1.77, server: , request: "POST /sp-platform/vehicles HTTP/1.1", upstream: "http:///vehicles", host: ""