Hi Jonathan,

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.
>

>From within the view function (i.e. handling the incoming request) I issue 
5 subrequests one after the other. Doing so I noticed that the number of 
subrequests was bound by the pool_size + max_overflow, hence my question 
here and in the SQLA group. 
 

> 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.
>

I'm not sure what you mean here: "during setup" meaning when the app 
starts, or when the request is being handled?

Cheers,
Jens

-- 
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/d476c9da-d45b-4530-b342-ff408fb0ef2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to