search cancel

PoolExhaustedException error when publishing with TDM Portal

book

Article ID: 8602

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

When performing a publishing action in the TDM Portal,  we see the following error in the job log when running a publishing job.

ERROR: Publish failed for job XXX, An error occurred resolving TABLE: <Table> COLUMN: <Column>. The expression was <@[email protected]>. The error is <resolve_meta_data_item: TDMServiceException: sqllist: CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.tomcat.jdbc.pool.PoolExhaustedException: [taskExecutor-2] Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:20; busy:20; idle:0; lastwait:30000].> 

Is there a way to address this issue?

 

Cause

By default,  the TDM portal uses connection pooling for all database connections.   Depending on the publishing type (lots of @sql in columns of the published table), you may need multiple connections to support the publishing of your data.  Although we have defined a max of 20 connections per "connectString+user",  you may need to adjust this setting if you have some 'database intensive' publishing of lookup data.

Environment

Release:       All supported versions of TDM
Component: TDM Portal

Resolution

To extend the maximum connection pool setting,   please follow the below steps.

 

1) Open C:\Program Files\CA\CA Test Data Manager Portal\conf\application.properties with your favourite text editor

2) Change the following line

    spring.datasource.tomcat.maxActive=20 

    to a higher value to support your publish

    spring.datasource.tomcat.maxActive=50

 

3) Save the file

4) Restart the TDM Portal

 

You should be able to run your publishing job again.

Additional Information

If you believe you are using too many connections when you are publishing a job,  we would suggest asking about how to reduce connections out in the Test Data Manager Communities, to see how you might be able to optimize your connection use.  We also have CA Services who would be able to assist (for a fee).

Although we do expose all the connection pool properties available in the application.properties file  (spring.datasource.tomcat),  we don't recommend changing values unless the change has been recommended by the CA Support team.

Extending the maxActive setting is a global setting for all database connections coming from the TDM Portal (including the TDM Repository).