FG
๐Ÿ—„๏ธ DatabasesMongoDB

Performance drop from 4.13.10 to 5.0.1

Freshabout 8 years ago
Mar 14, 20260 views
Confidence Score88%
88%

Problem

Do you want to request a feature or report a bug? Bug What is the current behavior? After upgrading from `4.13.10` to `5.0.1` on production environment, we noticed a real performance drop in all requests using mongoose models : ~200ms per response. We didn't release any code change apart from the `mongoose` dependency upgrade. And we don't use any particular feature of mongoose apart from models & schemas. After applying a fix to revert to `4.13.10`, everything went back to normal. Deploying with `5.0.1` : Reverting back to `4.13.10` : If the current behavior is a bug, please provide the steps to reproduce. More of a performance issue than a bug, so I'm not sure I will be able to reproduce it outside of a production environment. If someone knows any way to benchmark this I will be happy to try ๐Ÿ˜Š What is the expected behavior? Having response times around ~20ms for 150 RPS. Please mention your node.js, mongoose and MongoDB version.* node.js 8.9.4, mongoose 5.0.1, MongoDB 3.4.10. If it's of any use, we are on a cloud managed (Atlas) sharded cluster.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: Performance drop from 4.13.10 to 5.0.1

Low Risk

Interesting that both node and MongoDB times increased with 5.0.1. Are you able to isolate or narrow it down to a couple example requests that take significantly longer?

84

Trust Score

1 verification

100% success
  1. 1

    Interesting that both node and MongoDB times increased with 5.0.1. Are you able

    Interesting that both node and MongoDB times increased with 5.0.1. Are you able to isolate or narrow it down to a couple example requests that take significantly longer?

Validation

Resolved in Automattic/mongoose GitHub issue #6065. Community reactions: 0 upvotes.

Verification Summary

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

mongoosemongodbodmperformanceunderlying-library-issue