1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Java app crash after shard failover

Discussion in 'Programming/Internet' started by Shoxolat, Oct 8, 2018.

  1. Shoxolat

    Shoxolat Guest

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

    Mongo version 3.2.11 The config server are 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 times but none READ or WRITE was possible after the failure from my java app. When I restart the java app, all came back to normal.

    The guess:

    • The java app was waiting that is current writes end, but it never happen? ( the restart free the connections )
    • A timeout is missing on mongos?

    Thank you!

    Login To add answer/comment
     

Share This Page