[2.3.0] Timeout on local timeline
Similar to #1779 (closed) but different version. I switched to stable 2.3.0 (git), from stable 2.1.0 I think, and now local timeline always times out.
What I also did was pg_dump + backup config, delete the DB, and restore, it took 12 hours but finished with success, saving about 3 GB of disk. I didn't have enough disk for VACUUM. The slowest part was index rebuilding, so I believe the index should be OK...
Now I also upgraded to a server with more disk and ram for a test, but it didn't help.
Specs: 3 CPU, 8GB RAM, 80GB disk (postgres uses about 20)
Pleroma and postgres are running in docker.
pleroma |
pleroma |
pleroma | 16:14:19.040 request_id=Fo7xIgmeHBoIkCIAAA9j [error] Internal server error: %DBConnection.ConnectionError{message: "tcp recv: closed (the connection was closed by the pool, possibly due to a timeout or because the pool has been terminated)", reason: :error, severity: :error}
pleroma |
pleroma | 16:14:19.040 request_id=Fo7xIgmeHBoIkCIAAA9j [info] Sent 500 in 15021ms
pleroma |
pleroma | 16:14:19.044 [error] #PID<0.2270.0> running Pleroma.Web.Endpoint (connection #PID<0.1058.0>, stream id 38) terminated
pleroma | Server: piggo.space:80 (http)
pleroma | Request: GET /api/v1/timelines/public?local=true&only_media=false&with_muted=true&limit=20
pleroma | ** (exit) an exception was raised:
pleroma | ** (DBConnection.ConnectionError) tcp recv: closed (the connection was closed by the pool, possibly due to a timeout or because the pool has been terminated)
pleroma | (ecto_sql) lib/ecto/adapters/sql.ex:593: Ecto.Adapters.SQL.raise_sql_call_error/1
pleroma | (ecto_sql) lib/ecto/adapters/sql.ex:526: Ecto.Adapters.SQL.execute/5
pleroma | (ecto) lib/ecto/repo/queryable.ex:192: Ecto.Repo.Queryable.execute/4
pleroma | (ecto) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3
pleroma | (pleroma) lib/pleroma/pagination.ex:40: Pleroma.Pagination.fetch_paginated/4
pleroma | (pleroma) lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:118: Pleroma.Web.MastodonAPI.TimelineController.public/2
pleroma | (pleroma) lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:5: Pleroma.Web.MastodonAPI.TimelineController.action/2
pleroma | (pleroma) lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:5: Pleroma.Web.MastodonAPI.TimelineController.phoenix_controller_pipeline/2
pleroma-db | 2021-07-05 16:14:19.055 UTC [40] ERROR: canceling statement due to user request
pleroma-db | 2021-07-05 16:14:19.055 UTC [40] STATEMENT: SELECT a0."id", a0."data", a0."local", a0."actor", a0."recipients", a0."inserted_at", a0."updated_at", o1."id", o1."data", o1."inserted_at", o1."updated_at", NOT (t2."id" IS NULL) FROM "activities" AS a0 INNER JOIN "objects" AS o1 ON (o1."data"->>'id') = COALESCE(a0."data"->'object'->>'id', a0."data"->>'object') LEFT OUTER JOIN "thread_mutes" AS t2 ON (t2."user_id" = $1) AND (t2."context" = a0."data"->>'context') WHERE ($2 && a0."recipients") AND (a0."local" = TRUE) AND (a0."data"->>'type' = ANY($3)) AND (not (a0."actor" = ANY($4))) AND (((not (a0."recipients" && $5)) or a0."actor" = $6)) AND (recipients_contain_blocked_domains(a0."recipients", $7) = false) AND (not (a0."data"->>'type' = 'Announce' and a0."data"->'to' ?| $8)) AND ((not (split_part(a0."actor", '/', 3) = ANY($9))) or a0."actor" = ANY($10)) AND ((not (split_part(o1."data"->>'actor', '/', 3) = ANY($11))) or (o1."data"->>'actor') = ANY($12)) AND (not ( a0."data"->>'type' = 'Announce' and a0."actor" = ANY($13))) AND (NOT (a0."actor" = ANY($14))) AND (not(o1."data"->>'type' = 'Answer')) AND (not(o1."data"->>'type' = 'ChatMessage')) AND (NOT (a0."actor" = ANY($15))) AND (not (coalesce(a0."data"->'cc', '{}'::jsonb) ?| $16)) ORDER BY a0."id" desc nulls last LIMIT $17
pleroma-db | 2021-07-05 16:14:19.058 UTC [40] LOG: could not send data to client: Broken pipe
pleroma-db | 2021-07-05 16:14:19.058 UTC [40] FATAL: connection to client lost
pleroma |
Here's the postgres config: postgresql.conf
Edited by piggo