Tech Stack
I am using spring boot 1.3.5 for a rest service which internally fetch the data from database..ORM used is JOOQ and the connection pool management is done by BoneCP...
Requirement
I have a requirement where i need to fire multiple sql to fetch the data ,combine the result and return them all together...
ISSUE
I have achieved this using spring async but ran into problem where the spring sync method held up database connection and does not release them to database pool..After few hits the max connection is reached and application stops responding ...
try
As soon as i remove the @Async annotation from my method it works fine ..
Please suggest a possible solution to this problem where i need to fire multiple query and combine the result. Also another solution if someone help me if there is any settings in bonecp which release connections back to pool after timeout.
Consider following solutions. Then think what would fit in your application