Skip to content

Commit 6c40cbc

Browse files
author
Dushyant Bhalgami
authored
Merge pull request #44 from topcoder-platform/develop
added connection pool and other configs
2 parents 7e77645 + 441aeb2 commit 6c40cbc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/common/helper.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ const constants = require('../../app-constants')
1515
// Bus API Client
1616
let busApiClient
1717

18-
const driver = neo4j.driver(config.GRAPH_DB_URI, neo4j.auth.basic(config.GRAPH_DB_USER, config.GRAPH_DB_PASSWORD))
18+
const driver = neo4j.driver(config.GRAPH_DB_URI, neo4j.auth.basic(config.GRAPH_DB_USER, config.GRAPH_DB_PASSWORD), {
19+
maxConnectionLifetime: 20 * 60 * 1000,
20+
connectionTimeout: 1000 * 45,
21+
connectionAcquisitionTimeout: 60000,
22+
maxTransactionRetryTime: 10000,
23+
connectionPoolSize: 300
24+
})
1925

2026
/**
2127
* Wrap async function to standard express function

0 commit comments

Comments
 (0)