Skip to main content
Participating Frequently
April 12, 2021
Question

Datasource Connection Timeout with CF 2021

  • April 12, 2021
  • 1 reply
  • 731 views

 

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?

This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
April 18, 2021

What is your database brand and version? Could you also please share how you know you are accumulating more and more connections?

Participating Frequently
April 19, 2021

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.

BKBK
Community Expert
Community Expert
April 21, 2021

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#">