Products | Versions |
---|---|
TIBCO Data Virtualization | 7.0.0 and higher |
cs_server_client.log contains connection pool errors as shown below:
-------------
Caused by: com.compositesw.cdms.datasource.DataSourceException: Timeout 30 seconds while attempting to get connection from pool '/shared/Data_Sources/Oracle_ds'. Unable to create a new connection and timed out waiting for one of the 14 connections currently in use in the pool.
at com.compositesw.cdms.datasource.AbstractDataSource.getDataSourceConnection(AbstractDataSource.java:792)
at com.compositesw.cdms.datasource.AbstractDataSource.getDataSourceConnection(AbstractDataSource.java:761)
at com.compositesw.server.qe.physical.operator.SqlScan.e(SourceFile:616)
at com.compositesw.server.qe.physical.operator.SqlScan.d(SourceFile:584)
...
at com.compositesw.server.qe.QueryEngine.a(SourceFile:790)
at com.composite
-------------
On the data source's Advanced panel, do the following:
(1) Check whether the "Connection Validation query" field contains a query. If it does not, enter a lightweight query.
(2) Increase the value of the "Connection pool idle timeout" setting. For example, if the current value is 30, increase it to 120.
(3) Increase the value of the "Connection Pool Maximum size". For example, if it is 100, you can increase it to 200.
Of these three settings, the "Connection Validation Query" is the most important as it safeguards against stale connections.
Whenever TDV picks a connection object from the pool, before using the object, TDV will test it by running the Connection Validation query. TDV will only use the object if the query succeeds. If the query fails, TDV will iterate through the remaining objects in the pool until it finds an object that successfully runs the validation query.
If the above configuration settings do not resolve the issue, then the cause is likely to be one of the following external factors:
(A) An intermittent network connectivity problem
(B) The database server is closing out the connections at its end
While TDV can use the Validation Query to ensure that the initial connection is successfully made, if either of the above mentioned external factors occurs after the connection has been successfully made and is in-use, it will disrupt the connection causing the connection pool object to become stale. When this happens, the JDBC driver will sometimes write an exception to the log that helps us to analyse further.
Example
------------------------
Caused by: oracle.net.ns.NetException: Socket read timed out
at oracle.net.ns.Packet.receive(Packet.java:347)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:300)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1140)
------------------------
In this example, "oracle.net" refers to the Oracle driver's network API. The Oracle driver is saying that that is a possible network problem occurred.