• Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 12_01_17
    • Affects Version/s: 2.2.2
    • Component/s: None
    • Environment:
      Bluemix, Heroku

      In both PaaS I am getting:

      Mongo::Error::OperationFailure: Cursor not found (namespace: 'db.document', id: 2091440633504332855). (43)

      The processes failing are sidekiq jobs, it's not a matter of timeout, they fail right after started. The weird thing is that if I restart the daemons, it works, but after 10/15 minutes they fail again.

      I am using mongoid 5, compose as mongo hosting, DB 3.2. In compose they expose 2 mongos to connect.

      My mongo.yml:

      production:

      1. Configure available database clients. (required)
        clients:
      2. Defines the default client. (required)
        default:
      3. Defines the name of the default database that Mongoid can connect to.
      4. (required).
        database: <%= ENV['MONGODB'] %>
      5. Provides the hosts the default client can connect to. Must be an array
      6. of host:port pairs. (required)
        hosts:
      • <%= ENV['MONGOURI1'] %>
      • <%= ENV['MONGOURI2'] %>
        options:
      1. Change the default write concern. (default = { w: 1 }

        )

      2. write:
      3. w: 1
      1. Change the default read preference. Valid options for mode are: :secondary,
      2. :secondary_preferred, :primary, :primary_preferred, :nearest
      3. (default: primary)
      4. read:
      5. mode: :secondary_preferred
      6. tag_sets:
      7. - use: web
      1. The name of the user for authentication.
      2. The name of the user for authentication.
        user: <%= ENV['MONGOUSER'] %>
      1. The password of the user for authentication.
        password: <%= ENV['MONGOPASS'] %>
      1. Change the default authentication mechanism. Valid options are: :scram,
      2. :mongodb_cr, :mongodb_x509, and :plain. (default on 3.0 is :scram, default
      3. on 2.4 and 2.6 is :plain)
      4. auth_mech: :scram
      1. The database or source to authenticate the user against. (default: admin)
      2. auth_source: admin
      1. Force a the driver cluster to behave in a certain manner instead of auto-
      2. discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct
      3. when connecting to hidden members of a replica set.
        connect: :direct
      1. Changes the default time in seconds the server monitors refresh their status
      2. via ismaster commands. (default: 10)
      3. heartbeat_frequency: 10
      1. The time in seconds for selecting servers for a near read preference. (default: 5)
      2. local_threshold: 5
      1. The timeout in seconds for selecting a server for an operation. (default: 30)
      2. server_selection_timeout: 30
      1. The maximum number of connections in the connection pool. (default: 5)
        max_pool_size: <%= ENV['MONGOPOOL'] || 20 %>
      1. The minimum number of connections in the connection pool. (default: 1)
      2. min_pool_size: 1
      1. The time to wait, in seconds, in the connection pool for a connection
      2. to be checked in before timing out. (default: 5)
      3. wait_queue_timeout: 5
      1. The time to wait to establish a connection before timing out, in seconds.
      2. (default: 5)
      3. connect_timeout: 5
      1. The timeout to wait to execute operations on a socket before raising an error.
      2. (default: 5)
      3. socket_timeout: 5
      1. The name of the replica set to connect to. Servers provided as seeds that do
      2. not belong to this replica set will be ignored.
      3. replica_set: name
      1. Whether to connect to the servers via ssl. (default: false)
      2. ssl: true
      1. The certificate file used to identify the connection against MongoDB.
      2. ssl_cert: /path/to/my.cert
      1. The private keyfile used to identify the connection against MongoDB.
      2. Note that even if the key is stored in the same file as the certificate,
      3. both need to be explicitly specified.
      4. ssl_key: /path/to/my.key
      1. A passphrase for the private key.
      2. ssl_key_pass_phrase: password
      1. Whether or not to do peer certification validation. (default: false)
      2. ssl_verify: true
      1. The file containing a set of concatenated certification authority certifications
      2. used to validate certs passed from the other end of the connection.
      3. ssl_ca_cert: /path/to/ca.cert
      1. Configure Mongoid specific options. (optional)
        options:
      2. Includes the root model name in json serialization. (default: false)
        include_root_in_json: false
      1. Include the _type field in serialization. (default: false)
        include_type_for_serialization: true
      1. Preload all models in development, needed when models use
      2. inheritance. (default: false)
      3. preload_models: false
      1. Raise an error when performing a #find and the document is not found.
      2. (default: true)
        raise_not_found_error: false
      1. Raise an error when defining a scope with the same name as an
      2. existing method. (default: false)
      3. scope_overwrite_exception: false
      1. Use Active Support's time zone in conversions. (default: true)
      2. use_activesupport_time_zone: true
      1. Ensure all times are UTC in the app side. (default: false)
      2. use_utc: false

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            fcruxen@gmail.com Felipe Cruxen
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: