Performace issue

We are on Atlas shared M0 cluster.
We are facing some performance issues, we have a route on our backend application called
/allUsers it is taking 30-40 sec. to give use all users. along with this, while one request on /allUsers is fullfilling it blocks our all routes till /allUsers will not fullfill.

we have approx 750 enteries in allUsers collection with a schema of

  • Paste one or more documents here
    “name”: “Vansh x”,
    “email”: “”,
    “password”: “$2b$10$x/Zxxxxx5og9R7IRYIZ.o88vdVSZbfp2EIFXJMnWE08xHTRU93G”,
    “phone”: “25855xxxx”,
    “gender”: “Male”,
    “progressValue”: 25,
    “role”: “user”,
    “isVerified”: true,
    “__v”: 0,
    “jerseyNo”: {
    “$numberLong”: “1”
    “academicInfo”: {
    “course”: “b_tech”,
    “branch”: “cse”,
    “urn”: “587488”,
    “year”: “third”,
    “_id”: {
    “$oid”: “65ce2277e3d8bdb94sss1af04”
    i am not able to find the exact issue.

The exact issue is that you are expecting predictable performance out of M0. M0 is free. M0 is shared. And shared means that it is shared by others. Your performance are affected by workload of others running their cluster on the same infrastructure.

This being out of in the open. If anything takes

with only as few as

then the issue is not with your M0. The issue is your connection or your code.

The above seems to indicate some issues with your code. There is no reason to have one request blocking the others in async/await world of JS.