Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.
This repository was archived by the owner on Apr 17, 2018. It is now read-only.

Datamapper & connection pool logic #232

Open

Description

@kapso

So I am trying to use datamapper inside my Rails 3.2.8 app.

I have a config/initializers/dm.rb where I load the database.yml

hash = YAML.load(File.new("database.yml"))
DataMapper.setup(:default, hash[Rails.env])

I have a pool property set in the database.yml file, but I noticed that datamapper does not use that. It has this magic number 8 which it uses, where is this number coming from? And how can I configure pool settings for datamapper.

Activity

  1. nmccready commented on Aug 23, 2013

    @nmccready

    was this ever figured out? How do you set the datamapper pool size in the settings?

  2. knowtheory commented on Aug 23, 2013

    @knowtheory
    Member

    All of that stuff gets set down in DataObjects, and i can't remember
    exactly how to set it off hand. There should be a setting you can control
    through the database setup, but I don't recall off hand (and i'm totally
    swamped, otherwise i would lend a hand). Hopefully knowing where to look
    can give you a leg up on digging into the details.

    -T

    On Fri, Aug 23, 2013 at 11:48 AM, nmccready notifications@github.comwrote:

    was this ever figured out? How do you set the datamapper pool size in the
    settings?

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/232#issuecomment-23176020
    .

  3. nmccready commented on Aug 26, 2013

    @nmccready

    I found the code, but is the pool size and number of threads passed in via the database.yml file? IE is there pool: 100 setting?

  4. tpitale commented on Feb 8, 2016

    @tpitale
    Member

    There is no mention of pool in dm-rails either: https://github.com/datamapper/dm-rails

    The connection pooling appears to be done on a per-connection/adapter basis: https://github.com/datamapper/do/search?utf8=%E2%9C%93&q=pool_size

  5. tpitale commented on Feb 8, 2016

    @tpitale
    Member

    @nmccready To answer your question, it appears that the answer is no. I've opened an issue in DO to add the basic support for something like this. But I don't know if/when it will be done.

  6. added this to the Backlog milestone on Feb 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions