[NiFi][Oracle][DBConnectionPool] NiFi opens sessions but does not close them, leaving them inactive
Hello,
I am trying to solve a strange behavior of NiFi but can't really figure it out.
My flow consists of a GenerateTableFetch (which gets executed once per day), a ExecuteSQLRecord (which gets executed once it receives the files from GenerateTableFetch) and finally an PutS3Bucket.
Now, both the GenerateTableFetch and the ExecuteSQLRecord are using the same Controller Service, a DBConnectionPool which connects to an Oracle Database.
In the previous days I have noticed that I get plenty of sessions from NiFi (which is ok) but these sessions never get killed/terminated and they remain inactive. I am using the following configurations within my DBConnectionPool Service:
Max Wait Time: 500 millis
Max Total Connections: 51
Minimum Idle Connections: 0
Max Idle Connections: 5
Max Connection Lifetime: -1
Time Between Eviction Runs: -1
Minimum Evictable Idle Time: 30 mins
Soft Minimum Evictable Idle Time: -1
Unfortunately I was not able to find any information in the documentation (or maybe I did not fully understand it) therefor here is my question:
How can I make sure that all the sessions are create are getting closed once my flow has ended? I mean get killed and not set to inactive.
Thank you 🙂

