Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Cannot get a connection, pool error Timeout waiting for idle object

Avatar

Level 2

Hello everyone,

 

We are having an issue with our JDBC connection pool on the Manager Web Console
Configuration. We have created several custom workflow components that access a SQL Server Database and perform updates and inserts to the database. 

SebasRios34_0-1624381714803.png

When it reaches the third component (Bulk Update Part 3), it triggers the following error: Cannot get a connection, pool error Timeout waiting for idle object, but it works just fine with the other two.

 

I was able to find this article on how to create a DataSourcePool: http://scottsdigitalcommunity.blogspot.com/2013/09/injecting-datasourcepool-service-into.html

 

Any ideas what I could change in the data source pool configuration?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @SebasRios34,

If you are closing the connections upon usage correctly in other process components/wherever it is used and in need to additional connections through the connection pool,

  • You can increase the number of connections (Pool size - highlighted in red) in your respective OSGI factory config instance. 

If you are sure that the available number of connections is suffice(you already have greater number on Pool size based on the need) but still the timeout error is observed,

  • Increase the wait time (Pool wait - highlighted in green)

Vijayalakshmi_S_0-1624385652767.png

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @SebasRios34,

If you are closing the connections upon usage correctly in other process components/wherever it is used and in need to additional connections through the connection pool,

  • You can increase the number of connections (Pool size - highlighted in red) in your respective OSGI factory config instance. 

If you are sure that the available number of connections is suffice(you already have greater number on Pool size based on the need) but still the timeout error is observed,

  • Increase the wait time (Pool wait - highlighted in green)

Vijayalakshmi_S_0-1624385652767.png

Avatar

Level 2
Thank you very much! We were closing the connection pool incorrectly, nonetheless the pool size and pool wait helped us a lot!