On Thu, Jul 25, 2013 at 7:58 PM, kris <kkvilek...@gmail.com> wrote:
>
> My postgres.conf has a parameter  max_connections = 100

That's not only the default, but it's also not really recommended to
push it much higher, so only do so if you really need a big pool on
each machine, and if you're sure that pool will be mostly idle all of
the time.

> I was led to believe the SA would manage pool of connections
> to some good default
> (http://docs.sqlalchemy.org/en/rel_0_7/core/pooling.html?highlight=connection%20pool),
> but couldn't find the default values?  Just so I can relate the two figures
> (SA Pool parameters and PG max_connections)

pool_size, see create_engine[0], the default is 5

> Also Is there a good way to get it too close some idle connections?

Yes, decrease pool_size. Just how many workers do you have? With the
defaults, you'd need a little under 20 workers to start getting those
errors.

With that many workers, your only real solution is to install a
pgbouncer to manage those connections globally. SQLA cannot manage a
pool of connections across workers, only a shared pool (pgbouncer) can
do that. SQLA's pool is local to each process (worker).

[0] 
http://docs.sqlalchemy.org/en/rel_0_7/core/engines.html#sqlalchemy.create_engine

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to