eggjs / eggjs/egg

我使用的egg-mongoose出现了disconnect情况

Open
#5,147 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
19k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

不是bug!只是对此有点疑惑,希望有人能够帮助一下,不清楚是哪里配置有问题。

1. 一开始链接 egg-mongoose 是正常的,但是经过了一两天之后,就会偶尔出现 disconnect 报错

[egg-mongoose] mongodb://xxxxxx disconnected
53863 has failed with connection to xxxxx timed out

config.mongoose = {
client: {

url: 'mongodb://xxxxxxxx?authSource=admin&compressors=zlib',
options: {
useUnifiedTopology: true,
useNewUrlParser: true,
},
},
};

我的配置大概是这样,除了disconnect报错,也没有其他信息了,我不清楚是配置方面出了什么问题导致的,之前的版本一直没什么异常

### Reproduction Repo

null

### Node Version

16.19.1

### Eggjs Version

3.12.0

### Plugin Name and its version

"egg-mongoose": "^3.3.1"

### Platform and its version

ubuntu

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.