Direct Messages timeline: error 500 (pg timeout)
Using pleroma stable 2.3.0, postgres 12.7
When browsing to /users/me/dms
the list is empty, and clicking on Load older statuses
returns an error 500, pleroma logs shows:
Jul 25 20:18:12 fedistodon mix[19079]: 20:18:12.407 [info] GET /api/v1/timelines/direct
...
Jul 25 20:18:27 fedistodon mix[19079]: 20:18:27.418 [error] Postgrex.Protocol (#PID<0.1149.0>) disconnected: ** (DBConnection.ConnectionError) client #PID<0.5330.243> timed out because it queued and checked out the connection for longer than 15000ms
Jul 25 20:18:27 fedistodon mix[19079]: #PID<0.5330.243> was at location:
Jul 25 20:18:27 fedistodon mix[19079]: :prim_inet.recv0/3
Jul 25 20:18:27 fedistodon mix[19079]: (postgrex 0.15.7) lib/postgrex/protocol.ex:2838: Postgrex.Protocol.msg_recv/4
Jul 25 20:18:27 fedistodon mix[19079]: (postgrex 0.15.7) lib/postgrex/protocol.ex:1880: Postgrex.Protocol.recv_bind/3
Jul 25 20:18:27 fedistodon mix[19079]: (postgrex 0.15.7) lib/postgrex/protocol.ex:1735: Postgrex.Protocol.bind_execute_close/4
Jul 25 20:18:27 fedistodon mix[19079]: (db_connection 2.3.1) lib/db_connection/holder.ex:316: DBConnection.Holder.holder_apply/4
Jul 25 20:18:27 fedistodon mix[19079]: (db_connection 2.3.1) lib/db_connection.ex:1272: DBConnection.run_execute/5
Jul 25 20:18:27 fedistodon mix[19079]: (db_connection 2.3.1) lib/db_connection.ex:1359: DBConnection.run/6
Jul 25 20:18:27 fedistodon mix[19079]: (db_connection 2.3.1) lib/db_connection.ex:557: DBConnection.parsed_prepare_execute/5
Jul 25 20:18:27 fedistodon mix[19079]: 20:18:27.420 request_id=FpUbg5pO-R2nslUBIjkC [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}
Jul 25 20:18:27 fedistodon mix[19079]: 20:18:27.420 request_id=FpUbg5pO-R2nslUBIjkC [info] Sent 500 in 15013ms
Jul 25 20:18:27 fedistodon mix[19079]: 20:18:27.421 [error] #PID<0.5330.243> running Pleroma.Web.Endpoint (connection #PID<0.5498.243>, stream id 1) terminated
Jul 25 20:18:27 fedistodon mix[19079]: Server: pleroma.blah:80 (http)
Jul 25 20:18:27 fedistodon mix[19079]: Request: GET /api/v1/timelines/direct?with_muted=true&limit=20
Jul 25 20:18:27 fedistodon mix[19079]: ** (exit) an exception was raised:
Jul 25 20:18:27 fedistodon mix[19079]: ** (DBConnection.ConnectionError) tcp recv: closed (the connection was closed by the pool, possibly due to a timeout or because the pool has been terminated)
Jul 25 20:18:27 fedistodon mix[19079]: (ecto_sql 3.4.5) lib/ecto/adapters/sql.ex:593: Ecto.Adapters.SQL.raise_sql_call_error/1
Jul 25 20:18:27 fedistodon mix[19079]: (ecto_sql 3.4.5) lib/ecto/adapters/sql.ex:526: Ecto.Adapters.SQL.execute/5
Jul 25 20:18:27 fedistodon mix[19079]: (ecto 3.4.6) lib/ecto/repo/queryable.ex:192: Ecto.Repo.Queryable.execute/4
Jul 25 20:18:27 fedistodon mix[19079]: (ecto 3.4.6) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3
Jul 25 20:18:27 fedistodon mix[19079]: (pleroma 2.3.0-1-gb221d77a) lib/pleroma/pagination.ex:40: Pleroma.Pagination.fetch_paginated/4
Jul 25 20:18:27 fedistodon mix[19079]: (pleroma 2.3.0-1-gb221d77a) lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:84: Pleroma.Web.MastodonAPI.TimelineController.direct/2
Jul 25 20:18:27 fedistodon mix[19079]: (pleroma 2.3.0-1-gb221d77a) lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:5: Pleroma.Web.MastodonAPI.TimelineController.action/2
Jul 25 20:18:27 fedistodon mix[19079]: (pleroma 2.3.0-1-gb221d77a) lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:5: Pleroma.Web.MastodonAPI.TimelineController.phoenix_controller_pipeline/2
Using the mastofe it load the conversations fine.