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
I have searched existing issues to ensure the bug has not already been reported
Mongoose version
8.7.0
Node.js version
16.20.2
MongoDB server version
7.0
Typescript version (if applicable)
No response
Description
When trying to connect to a database using loadBalanced=true in the connection string, mongoose drops the connection after some time but never reconnects.
This happens in all versions >=8.7.0
8.6.4 doesn't have this issue and it reconnect successfully after the delay.
Steps to Reproduce
Providing sample code in which we manually add a delay so the connection drops and we never reconnect to MongoDB.
Setting heartbeatFrequencyMS to a value higher that the delay makes the issue go away but I'm not sure if this would be a recommended workaround.
Expected Behavior
Mongoose should reconnect to the MongoDB database and the query should work
The text was updated successfully, but these errors were encountered:
pieromarini
changed the title
loadBalanced=true drops connection and never reconnects
loadBalanced=true drops connection after a delay and never reconnects
Nov 15, 2024
Prerequisites
Mongoose version
8.7.0
Node.js version
16.20.2
MongoDB server version
7.0
Typescript version (if applicable)
No response
Description
When trying to connect to a database using
loadBalanced=true
in the connection string, mongoose drops the connection after some time but never reconnects.This happens in all versions >=8.7.0
8.6.4 doesn't have this issue and it reconnect successfully after the delay.
Steps to Reproduce
Providing sample code in which we manually add a delay so the connection drops and we never reconnect to MongoDB.
Setting
heartbeatFrequencyMS
to a value higher that the delay makes the issue go away but I'm not sure if this would be a recommended workaround.Expected Behavior
Mongoose should reconnect to the MongoDB database and the query should work
The text was updated successfully, but these errors were encountered: