-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database connection failed after update mongoose from 8.6.4 to 8.7.0 or higher #15015
Comments
Can you please print out what the ServerDescription object is in |
Of course here it is.
|
I am facing the exact same issue with mongoose 8.8.1 |
@lemagicien00 thanks for posting the error. Can you also show what |
The output given by error.reason.servers.get(serverUrlHere).error is MongoNetworkError: C0A77A8C407F0000:error:0A000438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1605:SSL alert number 80 I would like to make a clarification. |
After doing some test I can confirm that issue, It works on Mongoose 8.6.4 but fails on 8.7.0. So seems an issue introduced on this version: https://github.com/Automattic/mongoose/releases/tag/8.7.0 |
@lemagicien00 Looks like https://stackoverflow.com/questions/70871069/ssl-error-alert-number-80-when-calling-server-from-client - try upgrading to lastest Node.js 18.x? |
In production I can't migrate at will, I have to wait for the next scheduled maintenance. I will get back to you after this test. |
I have a similar issue. I am getting intermittent connection errors with Mongoose 8.7.0 and higher. I have a multi-tenant design and use the following function to switch db's and register the model(s) required:
With 8.7.0 the readyState comes in as "0" on the new db. With 8.6.4 it always came in a "1". Not sure if this is connected to why it is suddenly having issues. The frustrating part is that it seems random and intermittent. Some times the model can fetch without issue. Other times it fails with a "Operation 'model.findOne()' buffering timed out after 10000ms" error. |
I encountered the same issue. I upgraded Mongoose from I am using a serverless MongoDB Atlas database, deployed on Azure. The issue can be reproduced locally by attempting to connect to the database using Mongoose. The error log is as follows, and I hope this provides some help:
|
Same for me on GCP. Tests pass and when deploying everything is fine for a few minutes. But then all queries fail with |
We cannot upgrade to 8.7.0 or beyond, because I'm receiving the same connection issues discussed in Automattic/mongoose#15015. So further upgrades are paused until that is figured out.
Prerequisites
Mongoose version
8.8.0
Node.js version
18.15.0
MongoDB version
7.0.15
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Debian 4.19.0-24-cloud-amd64
Issue
When I update mongoose to version 8.7.0 or higher, I have a database connection error on MongoDb Atlas.
If I go back to mongoose version 8.6.4 everything works fine
The problem is the same from Windows (dev) or Debian Linux (production) on AWS EC2 and on OVH VPS.
The IPs are in the whitelist in mongodb atlas network access.
I did some tests by changing some options (like serverSelectionTimeoutMS) but it didn't change the error.
Log:
The code for connection:
Thank you for your help
The text was updated successfully, but these errors were encountered: