Hello, all How do I know that connection from the client is being taken from the connection pool and does not create a new one? Is there something in the ODBC log for that? Thank you Arcady |
Hello, all How do I know that connection from the client is being taken from the connection pool and does not create a new one? Is there something in the ODBC log for that? Thank you Arcady |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Question tags:
question asked: 17 Jun '20, 02:43
question was seen: 731 times
last updated: 17 Jun '20, 05:31
I don't know whether this can be checked via a connection property for a specific connection but the following database properties tell about the connection pooling state (at least for server-wise connection pooling via CPOOL=YES):
so you could check with these counters both whether connection pooling is in effect at all and whether a new connection increases the ConnPoolHits counter.
Note, cached connections are listed with an empty connection name and the ReqType = CONNECT_POOL_CACHE.
ok, this is weird I have 2 DBs, with the same schema. 2 ODBC connections, who look exactly the same. But one of the DBs has pooled connections and the other does not.
This is the connection log for the DB with pooled connections:
And this one for the one without
What am I supposed to be looking for?
Arcady
Well, AFAIK, connection pooling once starts when at least 5 connections with the same connection parameters have been made, so the log snippet does not tell that. FWIW, the client version seems different, but I don't know whether this might explain different behaviour.
OK, so which parameters count in order to pool the connection? I hope it is not AppInfo, because the thread ID will almost always be different Does connection name have to be the same?
See that FAQ (though dealing with .NET pooling) and further questions tagged with "connection-pooling"...
OK, so AppInfo is safe. Unfortunately, this still does not explain why I do not see a single pooled cache connection on the other DB... On the other hand, on this DB I do not have any connection errors, so - not that bad.
As stated, the different client version might make a difference here, if everything else is identical.