Disable statement cache size and prepared statement cache size in asyncpg connect args
Browse files- app/database.py +4 -1
app/database.py
CHANGED
|
@@ -15,7 +15,10 @@ engine = create_async_engine(
|
|
| 15 |
pool_size=10,
|
| 16 |
max_overflow=20,
|
| 17 |
pool_pre_ping=True,
|
| 18 |
-
connect_args={
|
|
|
|
|
|
|
|
|
|
| 19 |
)
|
| 20 |
|
| 21 |
AsyncSessionLocal = async_sessionmaker(
|
|
|
|
| 15 |
pool_size=10,
|
| 16 |
max_overflow=20,
|
| 17 |
pool_pre_ping=True,
|
| 18 |
+
connect_args={
|
| 19 |
+
"statement_cache_size": 0,
|
| 20 |
+
"prepared_statement_cache_size": 0
|
| 21 |
+
}
|
| 22 |
)
|
| 23 |
|
| 24 |
AsyncSessionLocal = async_sessionmaker(
|