(Migrated) outgoing SQL connection - pool size

(This message has been automatically imported from the retired mailing list)

Hello,

during my journey in Zato world I came across another question.

Context:
Outgoing SQL connection

There is a parameter which reads “pool size”, the role of this parameter
is pretty clear, but I don’t understand what exactly this number does.
Is it the max number of simultaneous connections? generally? per thread?
per process/server? how is it used at SQLAlchemy level?

Cheers!
Andrea

On 30/04/15 08:42, Andrea Peter wrote:

There is a parameter which reads “pool size”, the role of this parameter
is pretty clear, but I don’t understand what exactly this number does.
Is it the max number of simultaneous connections? generally? per thread?
per process/server? how is it used at SQLAlchemy level?

Hi Andrea,

it is per each gunicorn worker. An outgoing SQL connection with a pool
size of 10 created in a cluster of 2 servers 4 gunicorn workers each =
10 * 2 * 4 = 80 connections to a database.

The pool_size is one of the extra parameters SA’a create_engine receives:

https://github.com/zatosource/zato/blob/master/code/zato-server/src/zato/server/connection/sql.py#L93