Database timeout at fetching particular user's home timeline #937
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs change/feedback
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#937
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Your setup
From source
Extra details
Archlinux
Version
3.15.2
PostgreSQL version
17.2
What were you trying to do?
When a particular user gets
/api/v1/timelines/home?with_muted=false&limit=20
, database access times out and a 500 error is returned.What did you expect to happen?
Akkoma returns home timeline JSON.
What actually happened?
Akkoma returns 500 error by Timeout.
I can get
/api/v1/timelines/home?with_muted=false&limit=19
.Even if a new post is added, it still timeouts at
limit=20
, andlimit=19
succeeds.The user's user page appearing in that user's timeline will be displayed normally (
/api/v1/accounts/AXVHocJkYgkcbwDMEi/statuses?with_muted=false&exclude_replies=1&limit=20
).I have encountered similar problems in the past, but in those cases, adding more new posts solved the problem.
Logs
Akkoma's log:
PostgreSQL has no associated logs.
Result of getting
/api/v1/timelines/home?with_muted=false&limit=19
Long, unformatted JSON API response
Severity
I cannot use the software
Have you searched for this issue?
If, as you say, this happens every now and then with different users, chances are your hardware is too weak for your database or your PostgreSQL setup is misconfigured. If you haven’t already, check out database pruning tasks (objects, activities),
VACUUM ANALYZE
(check postgresql docs) and pgtune optimisation.To make sure and get some more insight though, before you change anything else, can you check whether
with_muted=true
completes with a limit of19
,20
and40
for the currently affected user?I checked and it seems that this is the only user (admin/first user) that is currently having problems.
In the past, a similar problem was reported by another user, but that was a completely different problem (from Pleroma-FE) and had already been resolved.
CPU usage is around 4% and memory usage around 60% at peak load, so it seems that the server hardware is probably not underpowered.
When I tried to retrieve the timeline earlier, it timeouted even with
limit=19
, and I could retrieve it withlimit=18
.It may be that the timeline is getting shorter and shorter, since the timeline was no longer available from the mobile app (Moshidon) before this problem surfaced in Pleroma-FE.
Any of limit
19
,20
, or40
timed out regardless of the value ofwith_muted
, and18
could be retrieved.I set the maintenance schedule for the day after tomorrow, so I will touch PostgreSQL then.
I did
prune_objects --vacuum
,prune_orphaned_activities
andvacuum analyze
.The problem was probably solved because limit=40 could be retrieved without any problem.
Thank you.
[bug] Database timeout at fetching particular user's home timelineto Database timeout at fetching particular user's home timeline