# dbt opening multiple connections to target database - how to restrict number of parallel connections

**URL:** <https://discourse.getdbt.com/t/dbt-opening-multiple-connections-to-target-database-how-to-restrict-number-of-parallel-connections/20262>\
**Category:** Help\
**Tags:** dbt-core\
**Created:** [September 30, 2025, 10:18am UTC](https://discourse.getdbt.com/t/dbt-opening-multiple-connections-to-target-database-how-to-restrict-number-of-parallel-connections/20262 "2025-09-30T10:18:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JosePaul](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@JosePaul](https://discourse.getdbt.com/u/JosePaul)\
**Post date:** [September 30, 2025, 10:18am UTC](https://discourse.getdbt.com/t/dbt-opening-multiple-connections-to-target-database-how-to-restrict-number-of-parallel-connections/20262/1 "2025-09-30T10:18:18Z")

</div>

## The problem I’m having

dbt opening multiple connections to target database where number of connections per user is restricted.

## The context of why I’m trying to do this

We have restricted number of connections to target Postgres Database. Would like to strictly limit the number of connections dbt makes.

## What I’ve already tried

Tested with different versions of dbt-bigquery as well as dbt-postgres adapters. It seems like even with `threads=1` dbt is initating one `master` connection and another set of connections for each `schema` defined in the dbt\_project.yaml. In our project we cannot use more two connections concurrently to target database. is there a way or configuration that we can use to ensure strictly the number of connections made to the target database. From logs we could see the connections are initiated like below

```auto
[0m16:42:27.610328 [debug] [MainThread]: Acquiring new bigquery connection 'master'
[0m16:42:27.671724 [debug] [ThreadPool]: Acquiring new bigquery connection 'list_gdp-project-id'
[0m16:42:27.674011 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:42:32.247486 [debug] [ThreadPool]: Acquiring new bigquery connection 'list_project-id_staging'
[0m16:42:32.249455 [debug] [ThreadPool]: Opening a new connection, currently in state init
[0m16:42:32.250455 [debug] [ThreadPool]: Acquiring new bigquery connection 'list_project-id_pre_consumption'
[0m16:42:32.252455 [debug] [ThreadPool]: Acquiring new bigquery connection 'list_project-id_consumption'

```

## Some example code or error messages

```auto

```
