You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes our database server restarts, which causes all clients using get disconnected. We have a whole bunch of servers which all talk to the same database, so I have to manually restart all of these to get them to reconnect again.
Making a MongoClient automatically reconnect closed connections would be nice, but would probably require a lot of work and might be out of scope for this project.
Instead, I'm fine with handling this myself, but the problem is that may calls result in an unhandled rejection being thrown that you can't easily catch.
Specifically Protocol.ts receive() seems to be generating a bunch of unhandled rejections. Sometimes I'm getting "Invalid response header". Other times this.#reader.readFull rejects with "Connection reset by peer".
I can reliably reproduce this by simply restarting mongod: brew services restart mongodb-community
The text was updated successfully, but these errors were encountered:
Sometimes our database server restarts, which causes all clients using get disconnected. We have a whole bunch of servers which all talk to the same database, so I have to manually restart all of these to get them to reconnect again.
Making a
MongoClient
automatically reconnect closed connections would be nice, but would probably require a lot of work and might be out of scope for this project.Instead, I'm fine with handling this myself, but the problem is that may calls result in an unhandled rejection being thrown that you can't easily catch.
Specifically
Protocol.ts receive()
seems to be generating a bunch of unhandled rejections. Sometimes I'm getting "Invalid response header". Other timesthis.#reader.readFull
rejects with "Connection reset by peer".I can reliably reproduce this by simply restarting mongod:
brew services restart mongodb-community
The text was updated successfully, but these errors were encountered: