DAL is not doing a keepalive on connections but web2py in trunk will
try 5 times to reopen closed connections.

On Apr 26, 10:21 am, Yarko Tymciurak <resultsinsoftw...@gmail.com>
wrote:
> On Apr 26, 2:17 am, annet <annet.verm...@gmail.com> wrote:
>
> > I came across this post:
>
> >http://groups.google.com/group/web2py/browse_thread/thread/82c1b8cdc1...
>
> > ... and read paragraph 6.1 and 6.2 of the manual. In paragraph 6.1 the
> > connection strings reads like:
>
> > db = DAL('sqlite://storage.db', pool_size=0); the default. From
> > 'Connection Pooling' I understand I'd better set the pool_size to for
> > instance 10. In the group I also see connections pools of size 20.
> > What's the best size to set the pool_size.
>
> "Best" is a performance issue.  There is a nice writeup of the kinds
> of "nuts and bolts" things involved (in general) 
> here:http://msdn.microsoft.com/en-us/library/8xx3tyca.aspx
>
> You can Google connection pooling (it can be handled at the db end, by
> a db utility, at the ORM end - SqlAlchamy, for example, will keep
> connections open).
>
> The question of what (if anything) DAL does at the DAL end, Massimo
> would need to answer.
>
> I will say this:    I had a "mere" 20 (very basic, it would seem) set
> on Webfaction / Postgres.   At some point (maybe 4 weeks back?), my
> Postgres connections on webfaction started failing - simply being
> denied.   I took away the connection pooling argument in my web2py
> app, and the connections resumed.
>
> This suggests:   DAL is not holding connections open for us, it's
> passing it on to the db;
> Webfactional either ignored the pool requests, or has their own setup
> and at some point denied if individual users tried to set any of the
> parameters (I am really guessing here).
>
> In any case, "it depends" is the answer. ;-)
>
> - Yarko
>
>
>
> > Kind regards,
>
> > Annet.

Reply via email to