I have server.js
and db.js
The db.js
file interacts with my database using Mongoose and I use server.js
to call functions
Make sure the server didn't ran out of storage space.
In my case none of the suggested answers helped. I was pulling out my hair until I've noticed that the server simply ran out of storage space. Clearing up a few megabytes of storage solved the error immediately.
The TransientTransactionError
actually makes sense in this scenario due to its nature of being a temporary error that could be resolved upon an explicit retry - though it did took me a while to figure out it had to do with a storage issue.