[SERVER-4822] How long does it usually take for mongos to figure out new primary of replicasets? Created: 31/Jan/12  Updated: 29/Feb/12  Resolved: 01/Feb/12

Status: Closed
Project: Core Server
Component/s: Replication, Sharding
Affects Version/s: 2.0.2
Fix Version/s: None

Type: Question Priority: Minor - P4
Reporter: Johnny Boy Assignee: Unassigned
Resolution: Done Votes: 0
Labels: mongos
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian Linux, PHP driver 1.2.6


Participants:

 Description   

Stepping down a primary with rs.stepDown() makes mongos unusable for a while, causing 500's on the website while it figures out changes. Instead of waiting I restarted mongos and it was working again.

How long is the normal re-configuration while new primaries are discovered etc?
And is there a good way to prevent the 500's on the PHP clients from even occurring while you do this.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 06/Feb/12 ]

Sounds like there is something else going on.
Can you send the mongos log?

Comment by Johnny Boy [ 06/Feb/12 ]

It seems to keep failing with db assertion failure, assertion: 'DBClientBase::findN:transport error until I restart mongos as soon as I do changes to replica sets. Which is a bit annoying when you have a few mongos running.

Even when the primary is the same machine afterwards, it doesn't seem like it reconnects to it without me interacting. Same goes for both PHP and Python driver when using mongos.

Did I miss something?

Comment by Eliot Horowitz (Inactive) [ 01/Feb/12 ]

reconfiguration usually takes a couple of seconds at most.

On the php side you should handle the mongo errors and handle appropriately for your app

Generated at Thu Feb 08 03:07:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.