Google profiling (tms-drivers connection leak)
We have used the query insights from google console to identify the query causing the spike. We filtered queries to match the time when the spike happened and we have found the specific query causing the issue.
The first one was the query in question is the first one shown on the picture

The other issue we discovered was that this table was being scan sequentially. I guess this would be a problem when you have a small table but this table had 1M + rows.
This diagram shows that the table is being scan sequentially.

The following picture shows the amount of rows this table has.

So, we have pointed out important issues that the developers need to start working on. * We have found the query causing the the connection pool exhaustion. * We discovered that the table is being scanned sequentially, therefore it would be a good idea to implement indexing. * According to the developers, the sessions that are not active supposed to be deleted automatically, thing that is not happening, so that is another issue we picked.
All this information has been relayed to tms developing team.