BT-VT commented on issue #11855: URL: https://github.com/apache/druid/issues/11855#issuecomment-1783115146
I was seeing the same exception while using a HikariCP pool to query Druid. The fix that worked for me was decreasing the [maxLifetime](https://github.com/brettwooldridge/HikariCP#frequently-used) set in my HikariConfig. I had it set to 15 min, and I noticed when I increased it the connection still failed at the 15 minute mark. I believe there's some other connection time limit equal to 15 min that is enforced on the druid server-side. When my maxLifetime was equal or greater than the druid limit, my HikariCP instance would continue trying to use the same connection after it's expired on the server side and druid would respond with a NoSuchConnectionException. **Lowering the maxLifetime forces the connection to be replaced in the pool before the server-side connection time limit is hit.** I originally saw this issue while debugging for long periods of time after the connection had been established. I thought it was related to the long idling of the connection while debugging but then I saw it happen while I was running tests that continuously queried druid for over 15 minutes in which case the connection was never idol. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
