Re: [pylons-discuss] DB QueuePool limit overflow and Pyramid sub-requests

2018-04-28 Thread Mike Orr
I'd second the recommendation to minimize the use of subrequests. A subrequest goes through the entire router overhead and just adds unnecessary complications and indirection and possible bugs. If you have two views and you want to call one from another, or one is a thin wrapper over the other,

Re: [pylons-discuss] DB QueuePool limit overflow and Pyramid sub-requests

2018-04-28 Thread jens . troeger
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

Re: [pylons-discuss] DB QueuePool limit overflow and Pyramid sub-requests

2018-04-28 Thread jens . troeger
Thank you Michael, In general I strongly urge you to reconsider using subrequests... they are > there for people to use but they have lots of drawbacks versus just calling > a bunch of reusable functions. > What would you recommend then to issue a request from within a view function? Using