3

I was working in my express project and suddenly I got Database related error.

When I refreshed my mongoDB database it shows me an error related to DATA Destroyed.I was shocked .But I was having backup of my DB collections so I droped my database and did restore again but then also I got the same error after some . When I tried to hit the API it works and fetch data.But in my mongo compass it shows null .

This happens me a lot in past two days.some times DB shows non of the data but when I tried to hit the API it works and fetch data some times & some times it shows error.

Is there any permanent solution for this?

Versions of packages I'm using :

  • mongoose: 5.6.1
  • Node : 1.18.10
  • Express: 4.16.3
sohil vaghasiya
  • 533
  • 1
  • 5
  • 13
  • It mostly has to do with mongoose connections dropping in b/w a process. Have a look at this [link](https://stackoverflow.com/q/30909492/6082280). Might help. – ambianBeing Aug 08 '19 at 17:53

0 Answers0