2022-09-05 17-58-21
Matthias Preuter
Improve database connectionmanager.
OutSystems 6.0
The current database connection manager uses hundreds of connections and doesn't close them properly. This causes poor performance and uses many system resources.

It is especialy poor when looping true a large recordset with foreach, we do have a workaround now by looping true a record set with an 'IF not index<RS.count-1', by doing so there is only 1 connection used.

Kind regards,
Matthias Preuter

Hi Matthias,

Thanks for your feedback on this subject.  I would like to understand your current problems with the Platform "Connection manager".

Before, let me clarify some of these topics. Regarding point 1, the Agile Platform uses the MS .Net connection manager to manage the connections to the database.
When the platform releases a connection, it is released to the .Net connection manager, so the connection is not really ended
(.Net keeps it to be reused). Only in certain situations does the Agile Platform "requests" the .Net connection manager to really free up
the connections. This is one of the reasons why the number of connections increases and does not reduces as the load decreases.

Regarding point 2, it could be a side effect of some possible optimization the Platform is doing. Depending on the usage of a query
the Platform can try to read the entire query to memory (using an additional connection/transaction).
Could you provide a sample espace with both usages (the good and the bad) ?

João Portela