Database daily restart/disconnection

We migrated our application from a dedicated Mongo instance to Mongo Cloud. We noticed our application disconnecting from the Database cluster on a daily basis. We are currently on the free tier.

It seems that the database servers are being restarted on a daily basis. We are running DEV and PROD versions of our application and both disconnect at the same time.
Are you aware of this? Is there a way to keep our application connected. I see 3 mongo instances in the cluster connection, I would have thought there would be some round-robin approach to such a restart. The disconnection lasts around 1 min.

M0 is not intended for production use.

I checked my M0 cluster. It’s quick, but is is a rolling restart.

MongoDB Enterprise Cluster0-shard-0:PRIMARY> rs.status().members.forEach(function(x){print(secondsToDhms(x.uptime))})
18 hours, 28 minutes, 10 seconds
18 hours, 28 minutes, 18 seconds
18 hours, 27 minutes, 55 seconds

Welcome to the community @Andrew_Chukwu!

Your application should be able to handle transient changes in cluster availability using a replication set connection with Retryable Writes and appropriate Read Preferences. If your application doesn’t cope well, you could post more information including your driver & version, a snippet of code that reproduces the issue, and the error message or behaviour observed.

Scheduled maintenance and relevant cluster configuration changes are performed with round-robin restarts, however you cannot influence the schedule for free and shared tier clusters (M0, M2, and M5).

If you have a dedicated Atlas cluster (M10+) you can Set Preferred Cluster Maintenance Start Times in your project settings and also Test Failover to confirm your application correctly handles failover.

Regards,
Stennie

2 Likes

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