Page 1 of 1

Connection pool [SOLVED]

Posted: 03.12.2020, 08:26
by stoffman
Hi,

Does Zeos support connection pooling (especially on postgres, but not limited to) ? If so can someone explain how can I configure my ZConnections (running in different threads) to use the pool? thank.

Re: Connection pool

Posted: 03.12.2020, 09:16
by marsupilami
Hello stoffman,

Zeos supports using connection pools. This are a different driver though. If you want to pool your connection, use "pooled.postgres". Connections will be pooled from there.
But the base principle for threads in Zeos still applies there: one conenction may only be used in one thread at the same time. Zeos is not thread safe beyond that.

Best regards,

Jan

Re: Connection pool

Posted: 03.12.2020, 15:05
by stoffman
Hi Jan,

I'm not sure what you mean by use "pooled.postgers" (I'm really new to zeos)

The only thing that resemble your suggestion is the protocol property in ZConnection that has: "pooled.*" value

Re: Connection pool

Posted: 03.12.2020, 19:12
by aehimself
"pooled." is a prefix, not a standalone protocol. If you need a pooled connection of "mysql" protocols, enter "pooled.mysql"; if you need "oracle", enter "pooled.oracle" and so on.

Re: Connection pool

Posted: 05.12.2020, 18:09
by stoffman
Thanks.