No way to avoid ReplicaSetNoPrimary errors

@Kushagra_Kesav

  1. Yes, I’ve contact supported just now. Awaiting a response.
  2. The pattern is quite random, but I think it happens more often after longer periods of not connecting to the app (i.e opening my app URL in the browser).
  • My connection string: mongodb+srv://${process.env.DB_USERNAME}:${process.env.DB_PASSWORD}@cluster0.nkmq1cz.mongodb.net/?retryWrites=true&w=majority;
  • The client-side environment is a Next.js app. The Mongo client is to connected to from a serverless Next.js API function.