Connection idle timeout in Application

The “Connection idle timeout (in minutes)” settings in the administrator is not reflected in the “You can also set this in the Application.cfc as follows:” widget at the bottom of the datasource config page nor in the 'Export" code.

Is there some “connectionIdleTimeout” setting I can use in code?

I think this.requesttimeout=... for use in your application.cfc is what you are looking for.

If you use other timeouts then the default, always make sure all other timeouts along the complete request chain can keep up the pace, such as webserver (e.g. httpRuntime executionTimeout=“180” in IIS ), tomcat connectors (connectionTimeout= in server.xml ) and boncode as well.

Clarification: I am looking for a way to set administrator/server/services/datasources, then…

I don’t believe that’s requesttimeout

ah, ok. This is set within your application.cfc with the setting this.datasources[“datasourceName”] that will look something like this (depending on your DB it may vary…):

this.datasources["test"] = {
	  class: 'com.mysql.cj.jdbc.Driver'
	, bundleName: 'com.mysql.cj'
	, bundleVersion: '8.0.19'
	, connectionString: 'jdbc:mysql://localhost:3306/test?characterEncoding=UTF-8&serverTimezone=Europe/Berlin&maxReconnects=3'
	, username: '...'
	, password: "encrypted:..."
	// optional settings
	, connectionLimit:100 // default:-1
	, connectionTimeout:1 // default: 1; unit: minutes
	, liveTimeout:60 // default: -1; unit: minutes
	, alwaysSetTimeout:true // default: false
	, validate:false // default: false

there you can see this setting with connectionTimeout.

The Lucee administrator export wizard will expose this data only after you’ve setup a working DSN.

Alternatively you can use cfadmin programmatically with <cfadmin action="updateDatasource"..., just like it’s used in the Lucee administrators code itself.

Hope this helps.

don’t copy/past the settings, ConnectionLimit:100 is not good, under load it will stop your server, better set to -1 or leave out

…changed from the default! If I set it to 1 it’s not displayed at all in the code at the bottom of the page, any other value is. Thanks, that’s exactly what I needed!