Managing Idle Database Connections Timeout
The database connections made from depend on JDBC and ODBC database driver types regardless of which database engine is used. With both drivers, the product relies on these drivers connections pooling to create and release database connections. Database connection pooling connections are reused instead of requiring each transaction to create a connection. This process reduces the computing overhead of creating and releasing connections for both our application and the database engine itself. As we use two different drivers, our methods and configurations for these pools differ and require individual management for each. This section explains the configurations to allow the administrator to customize these settings for the best performance in your environment.
aa821test
The database connections made from
Advanced Authentication
depend on JDBC and ODBC database driver types regardless of which database engine is used. With both drivers, the product relies on these drivers connections pooling to create and release database connections. Database connection pooling connections are reused instead of requiring each transaction to create a connection. This process reduces the computing overhead of creating and releasing connections for both our application and the database engine itself. As we use two different drivers, our methods and configurations for these pools differ and require individual management for each. This section explains the configurations to allow the administrator to customize these settings for the best performance in your environment.ODBC
database driver covers the CA Strong Authentication, CA Risk Authentication, and CA Case Management services. These services create connection pools based on the configuration options from DataDirect Connect for ODBC (32-bit driver). By default, the connection pool removes idle database connections only on actual network or connection issue.Idle Timeout enhancement provides the following benefits:
- Reduce the database load by gracefully closing the idle database connections.
- Monitor, track, and terminate the idle database connections.
- Enhances the user experience and effective error handling.
As administrator, you can configure and customize the database to suit your environment for optimal performance. Understand the configurations, components, and their impact on the connections. Each connection pool created has minimum and maximum settings. See the following example:
- When you have 2 Risk Authentication, 2 Strong Authentication, and 1 Case Management service and with the minimum values set to 4 and with the max value 32.
- At the application start, the total number of database connections is (2x4, 2x4, 1x4) = 20 database connections.
- The maximum number of connections are (2x32, 2x32, 1x32) = 160 connections.
- When you do not clean up the idle connections, this estimation can have resource implications on the database engine. These idle connections can impact especially when you use a shared database engine.
As
Advanced Authentication
administrator, you can manage the DB connections time out by configuring the following settings from Admin Console.- Stop CA Strong Authentication, CA Risk Authentication, and CA Case Management services.
- Navigate to Services and Server Configurations, Strong Authentication or Risk Authentication, Admin Console, Instance Configuration, Instance Management, Instance Name, Database Configuration, and edit the following properties:
- Max Idle Timeout(in Seconds)Specifies the idle time for database connections value in seconds. Default value is 0, which means that idle database connection management is not triggered. When you specify a value other than default (0), the idle DB connection management is initiated.For example, when you specifyMax Idle Timeout(in Seconds)value as 3600 seconds (60 minutes), the DB connections can remain idle for 60 minutes. After which, the DB connections decrement gradually toMinConnections.MinConnections specify the minimum number of connections to create betweenAdvanced Authenticationcomponents and the database in Admin Console. For more information about the DB configuration parameters, see arcotcommon.ini
- Monitor Thread Sleep Time (in Seconds)Specifies the amount of time insecondsthe Monitoring Thread sleeps between heartbeat checks on all databases. Default value is 1800. For example, setMonitor Thread Sleep Time (in Seconds)to 1800 (30 minutes) whenMax Idle Timeoutis set to 3600 (60 minutes)Reference tableEnsure you configure the properties proportional to yourfirewalltimeoutsettings. See the following example:Firewall TimeoutMax Idle TimeoutMonitor Thread Sleep Time90 minutes60 minutes30 minutes120 minutes90 minutes60 minutesWhen max idle time for DB connection hits the value and the total DB connections reach MinConnections, the connections are refreshed.
Max Idle Timeoutvalue must be lower than your firewall timeout settings.Monitor Thread Sleep Timevalue must be lower than your Max Idle Timeout settings - Refresh Cache from Admin Console.
- Start CA Strong Authentication, CA Risk Authentication, and CA Case Management services.