Niphold explanation is better than anything I could come out with.

One could ask why pool_size=1 and not pool_size=0 then?
A pool of one seems logical nonsense, but it works.
1 means that we keep recycling that same connection that is bound to
the non-threading process.
Think "recycle_connection=True" and write it as "pool_size=1"

mic


2013/2/18 Richard Vézina <[email protected]>:
> Thanks Niphold for clarification, really appreciate.
>
> Richard
>
>
> On Mon, Feb 18, 2013 at 4:17 PM, Niphlod <[email protected]> wrote:
>>
>> it "easy". if you run web2py using threads, then pooling is ok, since it's
>> managed in a single process, recycling connections in a pool for each new
>> thread that processes a request, and speeds up things a lot.
>>
>> A lot of webserver though use a single process to handle every request,
>> using fork() (gunicorn, uwsgi, and so on....) to provide concurrency. It
>> means that there are n processes able to serve up to n requests
>> concurrently.
>> In that case, there are no threads involved, so there's no need to use a
>> pool, because every request is handled in a "freshly created" new single
>> process.
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to