I am using a Mongo sharded cluster with 4 shards. All shards are a 3 members replica set with a PRIMARY with priority 1, a SECONDARY with priority 0.5 and an arbiter. The Mongo config server is a 3 members replica set as well.

Mongo version 3.2.11
The config server is on the same server as the first shard.

My Java app execute requests through two mongos instances.

The issue:
The server of the shard 1 PRIMARY failed, the SECONDARY got elected after some time but no READ or WRITE was possible after the failure from my Java app. When I restart the Java app, all came back to normal.

My guess:

  • The Java app was waiting until its current writes end, but it never happened? (and the restart freed the connections)
  • A timeout is missing on mongos?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.