quivr/backend
AmineDiro 757bceeb95
fix: asyncpg pooling config fix (#2795)
# Description

closes #2782.

Changes `sqlalchemy` connection pooling config : 

- **pool_pre_ping=True** : pessimistic disconnect handling. 

> - It is critical to note that the pre-ping approach does not
accommodate **for connections dropped in the middle of transactions or
other SQL operations** ! But this should only happen if we lose the
database either due to network of DB server restart.

- **pool_size=10**, with no db side pooling for now, if 6 uvicorn
process workers are spawned (or 6 instances of the backed) we have a
pool of 60 processes connecting to the database.
- **pool_recycle=1800** :  Recycles the pool every 30min

Added additional session config : 
- expire_on_commit=False, When True, all instances will be fully expired
after each commit, so that all attribute/object access subsequent to a
completed transaction will load from the most recent database state.
- autoflush=False, query operations will issue a Session.flush() call to
this Session before proceeding. We are calling `session.commit` (which
flushes) on each repository method so ne need to reflush on subsequent
access
2024-07-04 05:28:02 -07:00
..
.vscode feat: ⚙️🐞 configure debugger for the backend (#1345) 2023-10-09 15:23:13 +02:00
api fix: asyncpg pooling config fix (#2795) 2024-07-04 05:28:02 -07:00
core chore: Update flashrank npm dependency to version 0.2.5 (#2781) 2024-06-28 09:09:17 -07:00
supabase refacto(backend): poetry package manager and chat route refactoring (#2684) 2024-06-26 00:58:55 -07:00
.dockerignore closes #2756 (#2757) 2024-06-26 05:04:06 -07:00
.pre-commit-config.yaml refacto(backend): poetry package manager and chat route refactoring (#2684) 2024-06-26 00:58:55 -07:00
ci-migration.sh Update supabase token setting in ci-migration.sh 2024-05-02 00:04:01 +02:00
Dockerfile chore: Update flashrank npm dependency to version 0.2.5 (#2781) 2024-06-28 09:09:17 -07:00
Dockerfile.dev feat(backend): quivr-monorepo and quivr-core package (#2765) 2024-06-27 03:51:01 -07:00
poetry.lock feat: add megaparse (#2785) 2024-07-04 02:23:15 -07:00
poetry.toml feat(backend): quivr-monorepo and quivr-core package (#2765) 2024-06-27 03:51:01 -07:00
pyproject.toml feat(backend): quivr-monorepo and quivr-core package (#2765) 2024-06-27 03:51:01 -07:00