@patrick I know you added a fix to kill knex connections in one of the updates I am missing. But I don't know if it addresses specifically the Security restrict action or it addresses all knex connections(including the one created by Security Restrict).
Unfortunately I can't update at the moment so I have to stay in 3.4.2 until I finish a feature.
Additional info: I think it only happens via AJAX calls.
I have a page that performs 4 Restricts.
The first one is in the layout page which checks if the user can access the page. I believe this one doesn’t keep the connection idle and it is handled correctly.
Once the page is loaded it will call 3 SCs(ajax) which have a Restrict to avoid external access to the API. All these will end up creating idle connections that flood my DB.
Thanks for confirming Patrick. The code was there but for some reason it wasn’t working.
However, I finished the feature, updated to 3.5.4 and adapted all my code to work with globals.
This means that I removed each local Security Provider from all my API endpoints and left only the Restrict using the Global Security Provider. From that moment on the connections started to shut down correctly.
So this was only occurring with the combination of a SC file with a local Security Provider followed by a Security Restrict being called via AJAX on 3.4.2. Any first thought on why? I am truly intrigued.
Now everything is fine so if nothing comes up don’t worry at all. I am happy it’s fixed and this can be closed.