Closed cmMLWyrE4n6BQfcP44BTRHORCDHEGscyewLZV8b closed 7 months ago
ENABLE_SELF_CLOSE_CONNECTION controls the behaviour of the db().fetch() interface as defined above. In any case fabric will not hold more than one connection.
Broadway managed connections are always returned to the pool when the flow is complete (between populations).
Hi, When is a connection going back to the pool?
Reading: https://github.com/k2view-academy/K2View-Academy/issues/995:
_When using the syntax db(...).fetch,db(...).excute or using Broadway flows, Fabric will return each connection to the pool when query completed and will take a connection from the pool on the next query. ... This feature can be disabled using parameter ENABLE_SELF_CLOSECONNECTION (default true) = false, in this case, connection will return to the pool when sync is done and not when the command is done. To secure connection all over the activity so no one else will take it if required again.
But, reading: https://github.com/k2view-academy/K2View-Academy/issues/840:
All populations in single instance sync are sharing the same connection per interface. It means Fabric holds only one open connection per interface per sync at any time. No meter how many populations are running in parallel.
So when is a connection going back to pool?
Thank you