Request timeout after upgrading cluster to M10

After upgrading from the free tier to M10, my requests made from my website, to a Heroku node.js app (which I also upgraded), to the MongoDB, get no response (from Heroku to MongoDB Atlas). But it works fine if I do the requests locally. What could have gone wrong? It was working before the upgrades, I’ve checked the username, password, and I have IP address in the network access. Here is the relevant log:

2022-11-13T19:48:27.138026+00:00 app[web.1]: GET /db/levels/sp/all 200 30001.170 ms - 2
2022-11-13T19:48:27.468379+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/db/levels/sp/favs/0" request_id=60a029ce-814a-496f-aba5-fbd4c355fed7 fwd="" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
2022-11-13T19:48:27.470260+00:00 app[web.1]: POST /db/levels/sp/favs/0 - - ms - -
2022-11-13T19:48:27.470478+00:00 app[web.1]: error: MongooseServerSelectionError: Server selection timed out after 30000 ms

Any help is much appreciated, thanks in advance.

I haven’t done that before but the upgrade might have changed DNS names for your cluster. I suggest checking the connection string first since you already have the allowance from “anywhere”.

It seems that the issue was indeed related to the connection string. For some reason, on the Heroku version I left out &w=majority at the end of the connection string, which seemed to work before but not now. After adding it, it works as expected. Thanks.

1 Like

I think you should accept your response as the solution because it fits more like to be an answer. Mine was a suggestion, and although it is in the connection string, it is different than what was in my mind.

Cheers :wink:

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.