more on TMConnection.PoolingOptions.ConnectionLifetime

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
earlati
Posts: 18
Joined: Thu 18 Nov 2004 07:37
Location: Bergamo / Italy

more on TMConnection.PoolingOptions.ConnectionLifetime

Post by earlati » Tue 14 Feb 2006 08:12

The behaviour of paramenter ConnectionLifetime is not clear to me.
Inside the help is not specified the unity of measure used for this value.
that is:
TMConnection.PoolingOptions.ConnectionLifetime = 10
mean 10 seconds or milliseconds or others.

And another questionon this topic:
what exactly happen when I reach this timeout and I have a query still running, or a thread which hold ( which must create and remove ) is till keeping it , for a later use of this connection.

The help told onlu what is reported belowe, which is not enoth clear to me and search on internet for more explanation, but I found nothing.

ConnectionLifetime: Specifies the maximum time in which opened connection can be used by connection pool. Pool deletes connections with exceeded connection lifetime when TCustomDAConnection is about to close. If set ConnectionLifetime property to 0 (by default), then life time of connection is infinity.

Regards, Enzo

earlati
Posts: 18
Joined: Thu 18 Nov 2004 07:37
Location: Bergamo / Italy

Post by earlati » Tue 14 Feb 2006 08:14

Just another question about PoolingOptions:
There is a way to query a connections in order to get number of connections used and available.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 14 Feb 2006 10:43

> measure used for this value.
ConnectionLifetime is measured in seconds.

>what exactly happen when I reach this timeout and I have a query still
>running
If a query still running, connection will be keeping opened.
ConnectionLifetime concerns only inactive connections in pool.

> There is a way to query a connections in order to get number of
> connections used and available.
MyDAC doesn't provide such interface.

Post Reply