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

Unexpected Connection Pooling #6

Open
TonsOfFun opened this issue Oct 3, 2012 · 1 comment
Open

Unexpected Connection Pooling #6

TonsOfFun opened this issue Oct 3, 2012 · 1 comment

Comments

@TonsOfFun
Copy link

Hi,

I am using Puma, Sinatra, and dm-postgres-adapter with the following configuration. I am posting this issue on both Puma and dm-postgres-adapter.

  configure do
    enable :logging
    DataMapper.setup(:default, {
      adapter: 'postgres',
      host: 'localhost',
      pool: 5,
      database: 'my_app_development'
    })
    DataMapper.finalize
    DataMapper.auto_upgrade!
  end

This configuration has erratic connection behavior. If I the fix the threads in Puma to 2:2 under load I get 5 connections, with 4:4 I get 6 connections, and the default 0:16 uses 13 connections.

I am using siege -c 100 -r 10. What is the expected behavior here?

Thanks.

@phuesler
Copy link

Afaik, you cannot change the size of the connection pool in datamapper. Check the source code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants