0

I've got a MongoDB running on a medium EC2 instance and everything seems fine apart from the fact that I keep getting this error:

Could not connect to a primary node for replica set #<Moped::Cluster:70157124022400 @seeds=[<Moped::Node resolved_address="my_ip:my_port">]>

This seems to happen only when Sidekiq get a big loads of queued jobs, so the question is, is this a scalability issue?

Looking at the EC2 instance however, it rarely goes over 30% of CPU usage or 40% memory used.

asked Jul 28, 2017 at 12:23
3
  • What are your specific versions of Moped and MongoDB server? What sort of deployment do you have (replica set or sharded cluster)? Moped has had some historical issues with cluster monitoring/failover and isn't using an officially supported driver implementation (which would have explainable behaviour via the standard Server Discovery and Monitoring (SDAM) spec). Commented Jul 28, 2017 at 20:34
  • For full compatibility and feature support for modern versions of MongoDB I would recommend using the officially supported MongoDB Ruby driver. For a comparison of features and motivation for replacing Moped in Mongoid 5, see: Ruby Driver 2.0, a Rewrite. Commented Jul 28, 2017 at 20:34
  • Thank you for all comments. It turned the problem was performance with the server. The server was running at full capacity (100% cpu usage) and dropping connections as result. Commented Aug 4, 2017 at 12:33

1 Answer 1

1

As that error message say: It can not find IP address to "my_ip:my_port" named machine! ;-)

Check your configuration. Somewhere there is written that "my_ip:my_port"

answered Jul 28, 2017 at 17:10

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.