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
Our application experiences extremely high CPU utilization and slow MongoDB query performance when using Novu for notifications. Even after upgrading to a high-performance server (Standard D64lds v5: 64 vCPUs, 128 GiB memory on Azure), Novu consistently utilizes 100% of the CPU. Analysis reveals that MongoDB queries on the jobs collection result in full collection scans (COLLSCAN), leading to long execution times and high resource consumption.
Note the planSummary field, which reports COLLSCAN.
👍 Expected behavior
Queries on the jobs collection should use indexes to ensure efficient performance, avoiding full collection scans. CPU utilization should remain within reasonable limits even under high query loads.
Verify that appropriate indexes exist on the jobs collection for fields such as _environmentId, _parentId, and transactionId.
Optimize query structure to ensure indexes are utilized.
Profile queries to ensure efficient execution plans and address potential performance bottlenecks.
👎 Actual Behavior with Screenshots
MongoDB queries use COLLSCAN, resulting in high query execution times (up to 74 seconds).
CPU utilization reaches 100% on a powerful server (64 vCPUs, 128 GiB memory).
Slow query performance affects the overall application responsiveness.
Novu version
v2.1.0
npm version
No response
node version
No response
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
📜 Description
Our application experiences extremely high CPU utilization and slow MongoDB query performance when using Novu for notifications. Even after upgrading to a high-performance server (Standard D64lds v5: 64 vCPUs, 128 GiB memory on Azure), Novu consistently utilizes 100% of the CPU. Analysis reveals that MongoDB queries on the jobs collection result in full collection scans (COLLSCAN), leading to long execution times and high resource consumption.
Here are some sample query statistics:
Query 1:
Query 2:
👟 Reproduction steps
👍 Expected behavior
Queries on the jobs collection should use indexes to ensure efficient performance, avoiding full collection scans. CPU utilization should remain within reasonable limits even under high query loads.
👎 Actual Behavior with Screenshots
Novu version
v2.1.0
npm version
No response
node version
No response
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Contributing Guidelines?
Are you willing to submit PR?
Yes I am willing to submit a PR!
The text was updated successfully, but these errors were encountered: