Increase Neo4j connection pool size and timeouts
- Bump default connection pool size to 100 - Add new Neo4j timeout env variables to env.example
This commit is contained in:
parent
0171e0ce20
commit
2c7d2b3f5f
2 changed files with 5 additions and 1 deletions
|
|
@ -193,6 +193,10 @@ POSTGRES_MAX_CONNECTIONS=12
|
||||||
NEO4J_URI=neo4j+s://xxxxxxxx.databases.neo4j.io
|
NEO4J_URI=neo4j+s://xxxxxxxx.databases.neo4j.io
|
||||||
NEO4J_USERNAME=neo4j
|
NEO4J_USERNAME=neo4j
|
||||||
NEO4J_PASSWORD='your_password'
|
NEO4J_PASSWORD='your_password'
|
||||||
|
NEO4J_MAX_CONNECTION_POOL_SIZE=100
|
||||||
|
NEO4J_CONNECTION_TIMEOUT=30
|
||||||
|
NEO4J_CONNECTION_ACQUISITION_TIMEOUT=30
|
||||||
|
MAX_TRANSACTION_RETRY_TIME=30
|
||||||
# NEO4J_WORKSPACE=forced_workspace_name
|
# NEO4J_WORKSPACE=forced_workspace_name
|
||||||
|
|
||||||
### MongoDB Configuration
|
### MongoDB Configuration
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ class Neo4JStorage(BaseGraphStorage):
|
||||||
MAX_CONNECTION_POOL_SIZE = int(
|
MAX_CONNECTION_POOL_SIZE = int(
|
||||||
os.environ.get(
|
os.environ.get(
|
||||||
"NEO4J_MAX_CONNECTION_POOL_SIZE",
|
"NEO4J_MAX_CONNECTION_POOL_SIZE",
|
||||||
config.get("neo4j", "connection_pool_size", fallback=50),
|
config.get("neo4j", "connection_pool_size", fallback=100),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
CONNECTION_TIMEOUT = float(
|
CONNECTION_TIMEOUT = float(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue