Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-427

Trying to use connection pooling ... max pool size not matching mongoid.yml settings. Workers failing.

    XMLWordPrintable

    Details

    • Type: Question
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Works as Designed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 12_01_17
    • Component/s: None
    • Environment:
      Ubuntu 11.04, Mongod/Mongos/Config 2.0.4rc1 - Two shard cluster with 2 Node + Aribiter replica sets in each shard, Mongoid 2.4.6, Heroku Cedar Stack, Unicorn, Sidekiq

      Description

      When trying to use connection pooling in the 1.6.1 driver, the user is getting the following message:
      "could not obtain connection within 5.0 seconds. The max pool size is currently 1; consider increasing the pool size or timeout."

      Here is the current mongoid.yml file:

      defaults: &defaults
       allow_dynamic_fields: false
       max_retries_on_connection_failure: 20
       use_activesupport_time_zone: true
       identity_map_enabled: true
       pool_size: 35
       pool_timeout: 10.0

      The current connection count is 676 and seems to stay around that value, so something appears to be working. However, some jobs continue to fail with the above error.

      Gist of the error:
      https://gist.github.com/2c1aed9492bc5829e233

      Curious about this ticket: http://stackoverflow.com/questions/7583439/rails-3-1-thread-safety-broken

      Noted that the app is not using threadsafe!

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: