Query that was taking 14s now takes 13 mins

Yesterday while working on a project that includes a next.js front end and an express backend/api.

I have 4 collections in my DB. I am simply trying to query the products collection and get all products. There are ~15k documents in the collection. I did not change anything to do with the query itself, just changes to the font end. One second the query was working fine, the next it was taking minutes to finish.

I have no clue where it went wrong. If anyone has had this happen before let me know.

here is my query:

query Products {
  products {

here is my resolver:

products: async () => {
      return await Product.find().lean(true)

here is my shcema:

 type Product {
    id: ID!
    name: String
    code: String
    sku: String
    category: String
    vendors: [ProductVendor]

  type ProductStore {
    name: String
    price: Float
    onHand: Int
    onOrder: Float
    sales: Float

  type ProductVendor {
    name: String
    cost: Float
    quantity: Float

I went back and tested the queries in Apollo Server and ran into the same issue. All other calls to my other collections are working normally.

Any help would be appreciated.


Found a work around by exporting all the data, then terminating the cluster. Starting a new cluster and then importing everything.

This fixed it for about 12 hours, and then it happened again. None of the server code was touched. It occurred only after I ran queries to test my table.

I feel like mongo is delaying the query for some reason but i cant find out why. Let me know if i can provide more info.

The above scenario make me feel like you are hitting some operational limits of shared clusters.