I'm confused by wording on this, or perhaps the functionality in Pyramid.

> When I set the pool_size 
<http://docs.sqlalchemy.org/en/latest/core/engines.html#sqlalchemy.create_engine.params.pool_size>
 of 
the engine to *N* and max_overflow 
<http://docs.sqlalchemy.org/en/latest/core/engines.html#sqlalchemy.create_engine.params.max_overflow>
 to *M* then I can issue only a max of *N+M* subrequests, after which I get 
an exception:

Assuming you have 1 request and 5 subrequests, shouldn't there only be 2 
connections needed in the pool (i.e. the main request establishes a first 
connection, then subrequest 1 establishes a second connection which is 
re-used by 2-5)?  You wouldn't be able to save a connection like this if 
you had recursive subrequests - but that would be a design flaw in the 
application logic.

If you're connecting to sqlalchemy during your setup, you can screw up the 
connection pool unless you call `engine.dispose()` (see a thread from a few 
weeks ago), because SqlAlchemy's connections and pool aren't forksafe or 
threadsafe.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/ca945b9a-b9ce-4a2a-aede-f4a07226cb34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to