PgSQL timeout for a specific user posting to make timeline
Environment
Source
2.3.0-1-gb221d77a
Elixir 1.11.2 (compiled with Erlang/OTP 23)
Debian Stable
Postgresql 11.10-0+deb10u1
Bug description
Only happens for me, @josh@kiwifarms.cc, and only when posting on my main timeline. There is no problem replying, liking, reposting content. Only for posting directly to the TL. We've tried increasing the timeout but it never works.
Apr 16 19:33:05 kiwifarms mix[18249]: #PID<0.18965.0> was at location:
Apr 16 19:33:05 kiwifarms mix[18249]: :prim_inet.recv0/3
Apr 16 19:33:05 kiwifarms mix[18249]: (postgrex 0.15.7) lib/postgrex/protocol.ex:2838: Postgrex.Protocol.msg_recv/4
Apr 16 19:33:05 kiwifarms mix[18249]: (postgrex 0.15.7) lib/postgrex/protocol.ex:1880: Postgrex.Protocol.recv_bind/3
Apr 16 19:33:05 kiwifarms mix[18249]: (postgrex 0.15.7) lib/postgrex/protocol.ex:1735: Postgrex.Protocol.bind_execute_close/4
Apr 16 19:33:05 kiwifarms mix[18249]: (db_connection 2.3.1) lib/db_connection/holder.ex:316: DBConnection.Holder.holder_apply/4
Apr 16 19:33:05 kiwifarms mix[18249]: (db_connection 2.3.1) lib/db_connection.ex:1272: DBConnection.run_execute/5
Apr 16 19:33:05 kiwifarms mix[18249]: (db_connection 2.3.1) lib/db_connection.ex:613: DBConnection.execute/4
Apr 16 19:33:05 kiwifarms mix[18249]: (ecto_sql 3.4.5) lib/ecto/adapters/postgres/connection.ex:80: Ecto.Adapters.Postgres.Connection.execute/4
Apr 16 19:33:05 kiwifarms mix[18249]: 19:33:05.680 request_id=FnZtjYTPFQDfUVEAARDh [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}
Apr 16 19:33:05 kiwifarms mix[18249]: 19:33:05.680 [error] #PID<0.18965.0> running Pleroma.Web.Endpoint (connection #PID<0.18964.0>, stream id 1) terminated
Apr 16 19:33:05 kiwifarms mix[18249]: Server: kiwifarms.cc:80 (http)
Apr 16 19:33:05 kiwifarms mix[18249]: Request: POST /api/v1/statuses
Apr 16 19:33:05 kiwifarms mix[18249]: ** (exit) an exception was raised:
Apr 16 19:33:05 kiwifarms mix[18249]: ** (DBConnection.ConnectionError) tcp recv: closed (the connection was closed by the pool, possibly due to a timeout or because the pool has been terminated)
Apr 16 19:33:05 kiwifarms mix[18249]: (ecto_sql 3.4.5) lib/ecto/adapters/sql.ex:593: Ecto.Adapters.SQL.raise_sql_call_error/1
Apr 16 19:33:05 kiwifarms mix[18249]: (ecto_sql 3.4.5) lib/ecto/adapters/sql.ex:526: Ecto.Adapters.SQL.execute/5
Apr 16 19:33:05 kiwifarms mix[18249]: (ecto 3.4.6) lib/ecto/repo/queryable.ex:192: Ecto.Repo.Queryable.execute/4
Apr 16 19:33:05 kiwifarms mix[18249]: (ecto 3.4.6) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3
Apr 16 19:33:05 kiwifarms mix[18249]: (ecto 3.4.6) lib/ecto/repo/queryable.ex:112: Ecto.Repo.Queryable.one/3
Apr 16 19:33:05 kiwifarms mix[18249]: (pleroma 2.3.0-1-gb221d77a) lib/pleroma/marker.ex:62: anonymous fn/3 in Pleroma.Marker.multi_set_last_read_id/3
Apr 16 19:33:05 kiwifarms mix[18249]: (ecto 3.4.6) lib/ecto/multi.ex:646: Ecto.Multi.apply_operation/5
Apr 16 19:33:05 kiwifarms mix[18249]: (elixir 1.11.2) lib/enum.ex:2181: Enum."-reduce/3-lists^foldl/2-0-"/3