0

I've got a MongoDB Sharding with 8 servers, and 4 replicasets. Each replicaset has primary, secondary and arbiter.

The distribution is something like this:

- RS01 -> Server1A (primary), Server1B (secondary)
- RS02 -> Server2A (primary), Server2B (secondary)
- RS03 -> Server3A (primary), Server3B (secondary)
- RS04 -> Server4A (primary), Server4B (secondary)

The arbiters and config servers are distributed throught the different servers. (For example the arbiter of RS01 is on Server2B).

My problem, is that when I stop the service on Server1B (a secondary) for example,the Server1A gets overloaded in a few minutes, and the service fails.

My mongodb have around 1 Billion of documents, and have very high traffic. But in normal circunstances, the load doesn't pass 4 or 5 of load. So usually it's working fine, except when a single member of a replicaSet fails.

My mongodb-server version is 3.4.13, running under Debian Jessie, connecting to mongos from php with Pecl Mongodb version mongodb 1.4.3.

What could be the problem? Any ideas?

Thanks in advance.

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
RbT
  • 1
  • 1
  • If load on the primary increases significantly with a secondary unavailable, some likely causes might be workload shifted from the secondary or majority writes that can no longer be acknowledged (and are queuing unless you've set a timeout). Do you have any monitoring for your deployment that might give an indication of what metrics are increasing when your primary gets overloaded? Is your application using secondary read preferences or non-default write concerns (`w:majority` or `w:2` )? – Stennie Jun 02 '18 at 09:07
  • Hi, Thanks for your response. It's on w:majority , could this be the problem? – RbT Jun 09 '18 at 09:45

0 Answers0