ExpressGateway / express-gateway

A microservices API Gateway built on top of Express.js
https://www.express-gateway.io
Apache License 2.0
2.96k stars 344 forks source link

[Question] EG: Socket Hang Up #1067

Open Zakisu opened 1 year ago

Zakisu commented 1 year ago

I have an issue with Socket Hang Up when using Express Gateway. When express gateway making requests to a backend service, I often encounter a 502 error even though the backend service is in a normal state. Do I need to configure settings like proxyTimeout / timeout?

message: [EG:policy] warn: socket hang up

gateway.config.yml

-
        proxy:
          - action:
              serviceEndpoint: momotaro-2
              changeOrigin: true
              timeout: 66000

I assume this is a timeout issue when making requests to the service. Which one is correct to use for configuring the timeout when requests are sent from Express Gateway to the backend service, is it timeout or proxyTimeout?