Datasource Connection Timeout with CF 2021
Copy link to clipboard
Copied
I'm having a problem where my datasource connections are not timing out in CF 2021 and I'm accumulating more and more DB connections. In the Data & Services -> Data Sources -> My Data Source (Advanced) settings in the Administrator I have "Maintain Connections " checked, I have "Timeout (min) " set to 20 and " Interval (min)" set to 7, and the "Limit Connections" is not checked.
Do I need to alter any other settings, and if so, which ones, to get my datasource connections to time out after a period of inactivity?
Copy link to clipboard
Copied
What is your database brand and version? Could you also please share how you know you are accumulating more and more connections?
Copy link to clipboard
Copied
Database is SQL Server 2017.
Old connections do not timeout; they stay around long after the timeout period of 20 minutes, sometimes for days. New connections are added instead and the number of connections from coldfusion 2021 to the database just keeps increasing. They're easy to spot using sp_who2.
Copy link to clipboard
Copied
So, how many of the values in the Status column are RUNNABLE or RUNNING?
Suggestion:
<cfquery name="q" datasource="yourSQLServerDSN">
exec sp_who2
</cfquery>
<cfdump var="#q#">

