首页 > 解决方案 > GRPC intermittent connection, read ECONNRESE error

问题描述

Unfortunately i cannot provide much code due to the nature of the programme (not owned by me). I have an issue where I have 9 microservices all written with NestJs these microservices work fine locally however when i deploy them to a live network (made up of docker containers) 2 of the servers will sporadically get 14 UNAVAILABLE: read ECONNRESE errors. This issue does not seem to happen with all other services

i am using

Node: 16-alpine3.11

"@nestjs/microservices": "^8.0.6",
"@grpc/grpc-js": "^1.3.7", 
"@grpc/proto-loader": "^0.6.5", 

I am mainly confused why this issue only happens on a live docker environment (when i mean live i mean running over a docker network).

does anyone have any sort of idea why this would be (offer explanation as to why these connection errors happen) or any suggestions on how i can debug it. My initial thoughts are that it may be to do with packages, either an incompatibility or version issue.

标签: node.jsnestjsgrpcgrpc-node

解决方案


看起来这是我受节点影响的问题,看看这个线程https://github.com/grpc/grpc-node/issues/1907

提议是将节点版本降级到 16.8.0


推荐阅读