a single process will establish one connection only at the first request. I'm not sure if a newly spawned process will inherit (because of the nature of what uwsgi uses to spawn processes, a fork()) the db connection, anyway definitely there's no need to use a connection pooling mechanism to speed up execution times, it's damn fast the way it is already. In any case, the "pooling" should be done outside web2py (e.g. a pgpool-II instance for postgresql), because web2py is not in control on how uwsgi manages processes.
On Tuesday, November 27, 2012 2:00:07 PM UTC+1, Ralo Tannahill wrote: > > > I have configured nginx+uwsgi in CENTOS 6.3, with web2py 2.2.1 > As I have read in other posts, uwsgi is configured to use processes > instead of threads. > In this scenario if I want to use database connection pooling to avoid the > overhead of stablishing a new connection in every request. > Every process is a independent web2py instance with it's own connection > pool? > Should I use a pool of 1 connection in this case? > > Thanks in advance, kind regards > --