Skip to content

Commit a2932df

Browse files
committed
fix: constants
1 parent be4d8e3 commit a2932df

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

constants/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ export const MEMPOOL_PROCESS_DELAY = 100
278278
export const CHRONIK_FETCH_N_TXS_PER_PAGE = 200
279279
export const INITIAL_ADDRESS_SYNC_FETCH_CONCURRENTLY = 10
280280
export const TX_EMIT_BATCH_SIZE = 500
281-
export const TRANSFORM_TX_FROM_CHRONIK_BATCH_SIZE = 50
281+
export const TRANSFORM_TX_FROM_CHRONIK_BATCH_SIZE = 10
282282
export const DB_COMMIT_BATCH_SIZE = 500
283283

284284
export const TRIGGER_POST_CONCURRENCY = 100

prisma-local/clientInstance.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ import { PrismaClient } from '@prisma/client'
22

33
let prisma: PrismaClient
44

5-
const CONNECTION_LIMIT = 20
5+
const CONNECTION_LIMIT = 50
6+
const POOL_TIMEOUT = 30
67

78
function buildDatasourceUrl (): string {
89
const baseUrl = process.env.DATABASE_URL ?? ''
910
const separator = baseUrl.includes('?') ? '&' : '?'
10-
return `${baseUrl}${separator}connection_limit=${CONNECTION_LIMIT}`
11+
return `${baseUrl}${separator}connection_limit=${CONNECTION_LIMIT}&pool_timeout=${POOL_TIMEOUT}`
1112
}
1213

1314
interface CustomNodeJsGlobal extends NodeJS.Global {

0 commit comments

Comments
 (0)