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