после 2 месяцев работы моего приложения без проблем я получаю эту ошибку:
0|myapp-m | MongoError: topology was destroyed
Есть ли какой-нибудь чистый способ исправить эту проблему, используя @nestjs/mongoose
? Я использую его для импорта модуля:
imports: [MongooseModule.forRoot('mongodb://<myaddress>:27017/myApp', { useNewUrlParser: true }), OtherModule, AuthModule],
Спасибо!
0|myapp-m | MongoError: topology was destroyed
0|myapp-m | at executeCommand (/home/user/projects/myapp-mobile-noti-backend/node_modules/mongodb/lib/operations/db_ops.js:395:21)
0|myapp-m | at FindAndModifyOperation.execute (/home/user/projects/myapp-mobile-noti-backend/node_modules/mongodb/lib/operations/find_and_modify.js:90:5)
0|myapp-m | at executeOperation (/home/user/projects/myapp-mobile-noti-backend/node_modules/mongodb/lib/operations/execute_operation.js:83:26)
0|myapp-m | at Collection._findAndModify (/home/user/projects/myapp-mobile-noti-backend/node_modules/mongodb/lib/collection.js:1812:10)
0|myapp-m | at NativeCollection.(anonymous function) [as _findAndModify] (/home/user/projects/myapp-mobile-noti-backend/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:166:28)
0|myapp-m | at model.Query.<anonymous> (/home/user/projects/myapp-mobile-noti-backend/node_modules/mongoose/lib/query.js:3611:25)
0|myapp-m | at model.Query.deprecated (internal/util.js:66:15)
0|myapp-m | at model.Query.Query._findAndModify (/home/user/projects/myapp-mobile-noti-backend/node_modules/mongoose/lib/query.js:3580:26)
0|myapp-m | at model.Query.<anonymous> (/home/user/projects/myapp-mobile-noti-backend/node_modules/mongoose/lib/query.js:3402:8)
0|myapp-m | at model.Query._wrappedThunk [as _findOneAndRemove] (/home/user/projects/myapp-mobile-noti-backend/node_modules/mongoose/lib/helpers/query/wrapThunk.js:16:8)
0|myapp-m | at process.nextTick (/home/user/projects/myapp-mobile-noti-backend/node_modules/kareem/index.js:369:33)
0|myapp-m | at process._tickCallback (internal/process/next_tick.js:61:11) ```