-
I observed connection leaks when using SQL component using Karavan 4.4.0. How to reproduce:
Error: Integration which we used for confirming the issue: Additional notes:
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
You set a very low connection timeout of only 1s (1000 millis). The default value in Hikari is 30s (30000) private static final long CONNECTION_TIMEOUT = SECONDS.toMillis(30); The camel-sql component uses Spring JDBC that does all the connection acquire/release to the datasource, and that is known to be working fine world-wide. |
Beta Was this translation helpful? Give feedback.
-
Hi @davsclaus , that's just a leftover from my debugging. Sorry about that. If I remove that parameter and leave connection timeout to be default one, the same things are happening. I've just re-run my integration without that parameter, and I've got the same exception. Sometimes it appears after a minute, sometimes after 10 minutes... but it's always there. I've also tried to create an integration in another way, to have Scheduler component as a starting point, and then SQL component to be invoked inside of it, but same issues are happening. |
Beta Was this translation helpful? Give feedback.
-
okay I dont have a DB2 datbase, and would need to have some other kind of database. I am not sure if you can try to put together with another database - for example some basic database from a public docker image, you can run via docker, and try. I don't have much time this and next week for tracking this down. |
Beta Was this translation helpful? Give feedback.
-
moving to a dicusssion as this is not karavan bug/issue - but pure camel / spring-jdbc etc |
Beta Was this translation helpful? Give feedback.
-
ok good to know its a db2 driver issue - maybe its some known problem and you need to turn on some special option with db2 etc. |
Beta Was this translation helpful? Give feedback.
-
Also try to change the driverClassName to what is suggested in that link above. And it may be that you need to configure some kind of isValid SQL query for DB2, for it to check if a connection is valid or not. In general this is a DB2 issue and not Karavan/Camel |
Beta Was this translation helpful? Give feedback.
https://stackoverflow.com/questions/59087809/hikaricp-is-not-able-to-connect-to-db2-database#59087904
Also try to change the driverClassName to what is suggested in that link above. And it may be that you need to configure some kind of isValid SQL query for DB2, for it to check if a connection is valid or not.
In general this is a DB2 issue and not Karavan/Camel