openwallet-foundation / openwallet-foundation/askar
How are connections to the db managed?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 86
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
I'm curious how Askar manages connections to the database.
When switching from creating a separate DB per wallet to using profiles, I now get the error in CI for some tests:
Backend error
Caused by: pool timed out while waiting for an open connection
This seems to be an sqlx error if you create more connections than the allowed max_connections. Question now is: is this within a store? I thought a benefit of using profiles is that you can reuse the same connection to the database, even for different profiles. Is that indeed the case?
Tests are running with sqlite. Not sure if this behvaiour is different between postgres and sqlite?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by tracing how stores and profiles create or reuse sqlx connections, then reproduce the CI timeout with the SQLite tests and compare the PostgreSQL behavior. Done means the connection-sharing behavior is documented or corrected and the affected tests no longer exhaust the pool.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, rust, sqlite
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100