node.js - 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.
解决方案
看起来这是我受节点影响的问题,看看这个线程https://github.com/grpc/grpc-node/issues/1907
提议是将节点版本降级到 16.8.0
推荐阅读
- spring-boot - Springboot 2.2.1RELEASE - 需要 'org.springframework.jdbc.core.jdbctemplate' 类型的 bean
- c# - 如何在 .NetCore 2.2 中从 StartUp 注入 2 EventHubClient
- apache-kafka - 是否有任何读取 Kafka 主题的 Spring Schedule 示例?
- javascript - 使用 window.print() 强制重复的 printElement 转到页面底部;
- python - Python switch case,多值
- php - 我怎样才能让我的迷你推车恢复正常。(WooCommerce)
- go - Go 的 monkey.PatchInstanceMethod 返回“权限被拒绝”错误?
- excel - Userform Combobox 根据其值在媒体播放器中播放歌曲
- excel - 在excel中将时间戳转换为日期时间
- python - 无法从 IDE 外部使用在 Pycharm 中创建的虚拟环境