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

Timeout::Error in Replicaset config

      I have the Repl set configured on ports 27117, 27118 and 27119 locally. I have made sure the repl set configuration is correct in the DB layer, Check below,

      [ruby-1.9.3-p286] ~ mongo localhost:27117
      MongoDB shell version: 2.0.4
      connecting to: localhost:27117/test
      PRIMARY> exit
      bye

      [ruby-1.9.3-p286] ~ mongo localhost:27118
      MongoDB shell version: 2.0.4
      connecting to: localhost:27118/test
      SECONDARY> exit
      bye

      [ruby-1.9.3-p286] ~ mongo localhost:27119
      MongoDB shell version: 2.0.4
      connecting to: localhost:27119/test
      SECONDARY> exit
      bye

      This is my config/mongoid.yml file which I have configured as per the docs here.

      development:
      sessions:
      default:
      database: vimana-srinar
      hosts:

      • localhost:27117
      • localhost:27118
      • localhost:27119
        test:
        sessions:
        default:
        database: vimana_ui_test
        hosts:
      • localhost:27017
        options:
        consistency: :strong
        max_retries: 1
        retry_interval: 0

      When I visit the root path of the my application, I get Timeout::Error. Below is my server log,

      Started GET "/devices" for 127.0.0.1 at 2012-11-05 10:43:12 -0800
      Connecting to database specified by database.yml
      Processing by DevicesController#index as HTML
      MOPED: 127.0.0.1:27117 COMMAND database=admin command={:ismaster=>1} (293.0000ms)
      MOPED: 10.0.136.107:27017 COMMAND database=admin command={:ismaster=>1} (5012.0001ms)
      Rendered devices/index.html.haml within layouts/fluid (5344.0ms)
      Completed 500 Internal Server Error in 5372ms

      ActionView::Template::Error (execution expired):
      7: %th Status
      8: %th Current Part
      9: %tbody
      10: -@devices.each do |d|
      11: %tr
      12: %td=d.name
      13: %td=number_to_percentage(d.utilization_metrics.last.productionEfficiency * 100, :precision => 0)
      app/views/devices/index.html.haml:10:in `app_views_devices_index_html_haml__58521556_8544'

      I am running rails (3.2.8) on jruby-1.7.0 with mongoid (3.0.10), moped (1.2.7).

            Assignee:
            durran Durran Jordan
            Reporter:
            deepakprasanna deepakprasanna
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: