Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4527

Mongo::Error::SocketTimeoutError / getaddrinfo: Temporary failure in name resolution

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 5.1.4
    • Component/s: None
    • None
    • Environment:
      Ubuntu LTS / Ruby 2.3.1

      I'm getting quite a big percentage of name resolution errors and a bit of SocketTimeoutErrors.

      I'm getting these from my Resque jobs.

      Exception
      Mongo::Error::SocketTimeoutError
      Error
      execution expired
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/socket/ssl.rb:57:in `pack_sockaddr_in'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/socket/ssl.rb:57:in `block (2 levels) in connect!'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/socket.rb:199:in `handle_errors'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/socket/ssl.rb:57:in `block in connect!'
      /usr/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/socket/ssl.rb:56:in `connect!'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/address.rb:172:in `connect_socket!'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/server/connection.rb:86:in `connect!'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/server/connectable.rb:84:in `ensure_connected'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/server/connection.rb:256:in `write'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/server/connection.rb:215:in `deliver'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/server/connection.rb:132:in `block in dispatch'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/monitoring/publishable.rb:47:in `publish_command'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/server/connection.rb:131:in `dispatch'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/operation/executable.rb:37:in `block in execute'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/server/connection_pool.rb:110:in `with_connection'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/server.rb:250:in `with_connection'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/operation/executable.rb:35:in `execute'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/collection/view/iterable.rb:82:in `send_initial_query'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/collection/view/iterable.rb:42:in `block in each'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/retryable.rb:44:in `read_with_retry'
      /var/lib/gems/2.3.0/gems/mongo-2.5.0/lib/mongo/collection/view/iterable.rb:40:in `each'
      /var/lib/gems/2.3.0/gems/mongoid-5.1.4/lib/mongoid/query_cache.rb:207:in `each'
      /var/lib/gems/2.3.0/gems/mongoid-5.1.4/lib/mongoid/contextual/mongo.rb:252:in `first'
      /var/lib/gems/2.3.0/gems/mongoid-5.1.4/lib/mongoid/contextual/mongo.rb:252:in `find_first'
      /var/lib/gems/2.3.0/gems/mongoid-5.1.4/lib/mongoid/contextual.rb:20:in `find_first'
      /var/lib/gems/2.3.0/gems/mongoid-5.1.4/lib/mongoid/findable.rb:114:in `find_by'
      

        1. socketerror.png
          658 kB
          dakharlamov

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            d.a.kharlamov@gmail.com Dmitrii Kharlamov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: