element-hq / element-hq/dendrite
Failed to acquire database snapshot for sync request
- Dominant language
- Go
- Stars
- 967
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
*This issue was originally created by [**@starsareintherose**](https://github.com/starsareintherose) at .*
### Background information
- **Dendrite version or git SHA**: 0.10.7
- **Monolith or Polylith?**: Monolith
- **SQLite3 or Postgres?**: Postgresql
- **Running in Docker?**: no
- **`go version`**: 1.19.4
- **Client used (if applicable)**: element
### Description
- **What** is the problem:
log
```
Dec 09 23:44:25 helix dendrite[16324]: time="2022-12-09T15:44:25.820040149Z" level=info msg="Executing UpdateUserDailyVisits"
Dec 09 23:55:21 helix dendrite[16324]: time="2022-12-09T15:55:21.633855054Z" level=info msg="missing timeline limit, using default" req.id=1Z8Hw3aS1nKt req.method=POST req.path="/_matrix/client/r0/user/@malacology:matrix.malacology.net/filter" user_id="@malacology:matrix.malacology.net"
Dec 09 23:56:42 helix dendrite[16324]: time="2022-12-09T15:56:42.244262814Z" level=error msg="p.getJoinResponseForCompleteSync failed" device_id=oAFNo8cG error="pq: canceling statement due to user request" limit=20 req.id=GvdvwYhMSSAx req.method=GET req.path=/_matrix/client/r0/sync since=s0_0_0_0_0_0_0_0_0 timeout=0s user_id="@malacology:matrix.malacology.net"
Dec 09 23:56:42 helix dendrite[16324]: time="2022-12-09T15:56:42.245238884Z" level=error msg="Failed to acquire database snapshot for sync request" error="context canceled"
Dec 09 23:56:42 helix dendrite[16324]: time="2022-12-09T15:56:42.245354403Z" level=error msg="Failed to acquire database snapshot for sync request" error="context canceled"
Dec 09 23:56:42 helix dendrite[16324]: time="2022-12-09T15:56:42.245403723Z" level=error msg="Failed to acquire database snapshot for sync request" error="context canceled"
Dec 09 23:56:42 helix dendrite[16324]: time="2022-12-09T15:56:42.245449304Z" level=error msg="Failed to acquire database snapshot for sync request" error="context canceled"
Dec 09 23:56:42 helix dendrite[16324]: time="2022-12-09T15:56:42.245520601Z" level=error msg="Failed to acquire database snapshot for sync request" error="context canceled"
Dec 09 23:56:42 helix dendrite[16324]: time="2022-12-09T15:56:42.245569103Z" level=error msg="Failed to acquire database snapshot for sync request" error="context canceled"
Dec 09 23:56:42 helix dendrite[16324]: time="2022-12-09T15:56:42.245614437Z" level=error msg="Failed to acquire database snapshot for sync request" error="context canceled"
```
- **Who** is affected: maybe caused by server migration
- **How** is this bug manifesting: element reports: Unable to Connect to Homeserver
- **When** did this first appear: last month
### Steps to reproduce
- list the steps
- that reproduce the bug
- using hyphens as bullet points
Contributor guide
Research direction
Start by tracing the sync request path associated with “Failed to acquire database snapshot for sync request” and compare it with the PostgreSQL cancellation error in the report. Reproduce the failure if possible using the stated monolithic Dendrite setup, then verify that sync requests complete and Element can connect without these errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- backend-api-design, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100