# Database Connection Pool

Smile CDR manages a connection pool for each database connection. A number of [database config properties](/content/docs/configuration_categories/database.html) control the behaviour of these connection pools.

## Connection Pool Exhaustion

If Smile CDR requests a database connection from the database and none is available, then you will see an error message like the following in the logs.

```text
Cannot get a connection, pool error Timeout waiting for idle object
```

Copy

The first thing to check is that the value for [db.connectionpool.maxtotal](/content/docs/configuration_categories/database.html#property-max-total-connections/index.html) is lower than the number of database connections available for Smile CDR (as configured on the database server).

If that does not resolve the issue, then you should set the following configuration parameters to true:

- [db.connectionpool.remove\_abandoned\_on\_borrow](/content/docs/configuration_categories/database.html#property-remove-abandoned-on-borrow/index.html)
- [db.connectionpool.log\_abandoned](/content/docs/configuration_categories/database.html#property-log-abandoned/index.html)

This will return abandoned connections to the connection pool and DEBUG log their stack traces. You may wish to enable the [Connection Pool Troubleshooting Log](/content/docs/logging/troubleshooting_logs.html#connection-pool-troubleshooting-log/index.html) so these log messages are in a separate file from your main log file.

[Database Design](/content/docs/database_administration/database_design.html)

Database Connection Pool

Database Administration

[Database Design](/content/docs/database_administration/database_design.html)
[Database Connection Pool](/content/docs/database_administration/database_connection_pool.html)
[Setting Up PostgreSQL](/content/docs/database_administration/setting_up_postgresql.html)
[Troubleshooting PostgreSQL](/content/docs/database_administration/troubleshooting_postgresql.html)
[Setting Up MySQL](/content/docs/database_administration/setting_up_mysql.html)
[Setting Up MariaDB](/content/docs/database_administration/setting_up_mariadb.html)
[Setting Up Oracle](/content/docs/database_administration/setting_up_oracle.html)
[Setting Up SQL Server (MSSQL)](/content/docs/database_administration/setting_up_sql_server_mssql.html)
[AWS RDS Authentication](/content/docs/database_administration/rds_auth.html)
[Azure Entra Authentication](/content/docs/database_administration/entra_auth.html)

[Setting Up PostgreSQL](/content/docs/database_administration/setting_up_postgresql.html)
