Within a workflow, I have a for loop and I am running an sql query in the loop. So, for each of this query in the loop, the SQL plugin is opening new sessions. Ideally, a single workflow should use a single connection and this connection should be used for all of the queries within the workflow and at the end of the workflow, the session should be closed.
For example, I have a workflow that uses for loop and within the for loop, I have 2 SQL queries. Now, if I run this workflow, it opens 20 connections to the database and none gets closed. So ultimately, I am maxing out the number of connections to the database and not able to connect to the database anymore.