Why have I been intermittently getting 504 gateway timeout errors?

My website is built with Next.js and hosted on Vercel. Data is stored and fetched from MongoDB Atlas. Most of the time there are no issues however about two or three times in the last couple weeks, I’ve gotten this 504 gateway timeout error. I currently have two clusters in Atlas and what has ended up fixing the issue is importing the data into another collection on the other cluster, I’m not sure why. What are the reasons that this is happening and why intermittently? I’m not too experienced with diagnosing issues with databases. Let me know if there is anymore information I can provide. Thanks.

1 Like

What type of cluster are you using on the MongoDB Atlas side? We have heard reports along these lines elsewhere and are attempting to pin down the specific circumstances. If you could open a support case with us, it could help us more rapidly get to the bottom of this

I am facing the same problem with M30 and up

Ap-southeast-1

This hasn’t happened for about a month… so I assumed whatever issues were happening were solved but this happened again today. I have two clusters and when this happens I’ve figured out that I need to move the data from one cluster to another and when it happens again I have to move it back to the other cluster. I don’t know if the information below is helpful because it doesn’t seem to matter as it has happened on both. It appears when one cluster is timing out, the other one appears to work. Hope this is helpful.

Cluster 1:
VERSION
7.0.7

REGION
AWS / Oregon (us-west-2)

CLUSTER TIER
M0 Sandbox (General)

Cluster 2:
VERSION
7.0.7

REGION
AWS / N. Virginia (us-east-1)

CLUSTER TIER
M0 Sandbox (General)

Same issue here, though I can consistently trigger the error 504 with a specific data replace query.

M0 cluster
Google Cloud / Iowa (us-central1)