Making post occasionally fails with Postgrex error XX000 Lost path
Environment
- Installation type (OTP or From Source): Source
- Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE): 2.1.2
- Elixir version (
elixir -v
for from source installations, N/A for OTP): Elixir 1.10.4 (compiled with Erlang/OTP 22) - Operating system: Ubuntu 20.04
- PostgreSQL version (
psql -V
): psql (PostgreSQL) 11.9 (Ubuntu 11.9-1.pgdg20.04+1)
Bug description
Occasionally making a post returns a 500 error with the following in logs.
01:45:10.839 request_id=FlvNYZu47thAKwIBJO1h [error] Internal server error: %Postgrex.Error{connection_id: 78300, message: nil, postgres: %{code: :internal_error, file: "rumbtree.c", line: "328", message: "Lost path", pg_code: "XX000", >
01:45:10.840 [error] #PID<0.5597.242> running Pleroma.Web.Endpoint (connection #PID<0.5362.242>, stream id 1) terminated
Server: letsalllovela.in:80 (http)
Request: POST /api/v1/statuses
** (exit) an exception was raised:
** (Postgrex.Error) ERROR XX000 (internal_error) Lost path
(ecto_sql 3.4.5) lib/ecto/adapters/sql.ex:593: Ecto.Adapters.SQL.raise_sql_call_error/1
(ecto 3.4.5) lib/ecto/repo/schema.ex:661: Ecto.Repo.Schema.apply/4
(ecto 3.4.5) lib/ecto/repo/schema.ex:263: anonymous fn/15 in Ecto.Repo.Schema.do_insert/4
(pleroma 2.1.2) lib/pleroma/web/activity_pub/utils.ex:249: Pleroma.Web.ActivityPub.Utils.insert_full_object/1
(pleroma 2.1.2) lib/pleroma/web/activity_pub/activity_pub.ex:120: Pleroma.Web.ActivityPub.ActivityPub.insert/4
(pleroma 2.1.2) lib/pleroma/web/activity_pub/activity_pub.ex:248: Pleroma.Web.ActivityPub.ActivityPub.do_create/2
(ecto_sql 3.4.5) lib/ecto/adapters/sql.ex:875: anonymous fn/3 in Ecto.Adapters.SQL.checkout_or_transaction/4
(db_connection 2.2.2) lib/db_connection.ex:1427: DBConnection.run_transaction/4
Edited by nik