diff --git a/packages/core/src/modules/ledger/services/IndyPoolService.ts b/packages/core/src/modules/ledger/services/IndyPoolService.ts index ba12b147aa..e1a312c71e 100644 --- a/packages/core/src/modules/ledger/services/IndyPoolService.ts +++ b/packages/core/src/modules/ledger/services/IndyPoolService.ts @@ -40,10 +40,15 @@ export class IndyPoolService { * Create connections to all ledger pools */ public async connectToPools() { - const poolsPromises = this.pools.map((pool) => { - return pool.connect() - }) - return Promise.all(poolsPromises) + const handleArray: number[] = [] + // Sequentially connect to pools so we don't use up too many resources connecting in parallel + for (const pool of this.pools) { + this.logger.debug(`Connecting to pool: ${pool.id}`) + const poolHandle = await pool.connect() + this.logger.debug(`Finished connection to pool: ${pool.id}`) + handleArray.push(poolHandle) + } + return handleArray } /**