[bug] Meilisearch Jason.DecodeError #635

Open
opened 2023-08-23 03:47:24 +00:00 by amolith · 1 comment

Your setup

OTP

Extra details

Alpine Linux 3.18

Version

ba1ed37edf

PostgreSQL version

13

What were you trying to do?

su pleroma -s $SHELL -lc "./bin/pleroma_ctl search.meilisearch index"

What did you expect to happen?

I expected Meilisearch to index however many millions of posts my instance has seen over the years.

What actually happened?

I don't fully understand the output, but it looks like the index operation crashed for some reason. The logs below are from the last time I ran the index command (last week or the week before).

However, the stats command does show that Meilsearch has been indexing something since then.

su pleroma -s $SHELL -lc "./bin/pleroma_ctl search.meilisearch stats"
Number of entries: 1349784
Indexing? true

I'm not entirely sure whether this is actually the case, but Meilisearch might be interfering with my Mumble server? There are very unusual connectivity issues and they only started happening after I started indexing posts with Meilisearch. I'd like to get this issue resolved and everything between Akkoma/Meilisearch working smoothly so I can see whether the issues with Mumble still happen. All three are running in LXD on the same host and there might be some weird LXD networking things going on.

Logs

Sample of the logs before the command exited

17:49:21.595 [debug] QUERY OK source="objects" db=35.8ms
SELECT o0."id", o0."data", o0."inserted_at", o0."updated_at" FROM "objects" AS o0 WHERE (data->>'type' = 'Note' AND (data->'to' ? $1 OR data->'cc' ? $2)) ORDER BY data->'published' DESC ["https://www.w3.org/ns/activitystreams#Public", "https://www.w3.org/
ns/activitystreams#Public"]

17:49:21.878 [debug] QUERY OK source="objects" db=15.9ms
SELECT o0."id", o0."data", o0."inserted_at", o0."updated_at" FROM "objects" AS o0 WHERE (data->>'type' = 'Note' AND (data->'to' ? $1 OR data->'cc' ? $2)) ORDER BY data->'published' DESC ["https://www.w3.org/ns/activitystreams#Public", "https://www.w3.org/
ns/activitystreams#Public"]

17:49:22.173 [debug] QUERY OK source="objects" db=9.0ms
SELECT o0."id", o0."data", o0."inserted_at", o0."updated_at" FROM "objects" AS o0 WHERE (data->>'type' = 'Note' AND (data->'to' ? $1 OR data->'cc' ? $2)) ORDER BY data->'published' DESC ["https://www.w3.org/ns/activitystreams#Public", "https://www.w3.org/
ns/activitystreams#Public"]

17:49:22.428 [debug] QUERY OK source="objects" db=36.3ms
SELECT o0."id", o0."data", o0."inserted_at", o0."updated_at" FROM "objects" AS o0 WHERE (data->>'type' = 'Note' AND (data->'to' ? $1 OR data->'cc' ? $2)) ORDER BY data->'published' DESC ["https://www.w3.org/ns/activitystreams#Public", "https://www.w3.org/
ns/activitystreams#Public"]
Indexed 1100000 entries
17:49:37.469 [debug] QUERY OK source="objects" db=861.3ms
SELECT o0."id", o0."data", o0."inserted_at", o0."updated_at" FROM "objects" AS o0 WHERE (data->>'type' = 'Note' AND (data->'to' ? $1 OR data->'cc' ? $2)) ORDER BY data->'published' DESC ["https://www.w3.org/ns/activitystreams#Public", "https://www.w3.org/
ns/activitystreams#Public"]

17:49:37.470 [debug] QUERY OK db=0.2ms
rollback []
** (Jason.DecodeError) unexpected end of input at position 0
    lib/jason.ex:92: Jason.decode!/2
    lib/pleroma/search/meilisearch.ex:61: Pleroma.Search.Meilisearch.meili_put/2
    lib/mix/tasks/pleroma/search/meilisearch.ex:88: anonymous fn/1 in Mix.Tasks.Pleroma.Search.Meilisearch.run/1
    (elixir 1.14.3) lib/stream.ex:481: anonymous fn/4 in Stream.each/2
    (elixir 1.14.3) lib/enum.ex:4751: Enumerable.List.reduce/3
    (elixir 1.14.3) lib/stream.ex:1026: Stream.do_transform_inner_list/7
    (elixir 1.14.3) lib/stream.ex:1811: Enumerable.Stream.do_each/4
    nofile:1: (file)
pleroma:/opt/pleroma# 

Severity

I cannot use it as easily as I'd like

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Your setup OTP ### Extra details Alpine Linux 3.18 ### Version ba1ed37edf98dafe148e1efb768292b295e37aaa ### PostgreSQL version 13 ### What were you trying to do? ```bash su pleroma -s $SHELL -lc "./bin/pleroma_ctl search.meilisearch index" ``` ### What did you expect to happen? I expected Meilisearch to index however many millions of posts my instance has seen over the years. ### What actually happened? I don't fully understand the output, but it _looks_ like the index operation crashed for some reason. The logs below are from the last time I ran the index command (last week or the week before). However, the `stats` command does show that Meilsearch has been indexing _something_ since then. ``` su pleroma -s $SHELL -lc "./bin/pleroma_ctl search.meilisearch stats" Number of entries: 1349784 Indexing? true ``` I'm not entirely sure whether this is actually the case, but Meilisearch might be interfering with my Mumble server? There are very unusual connectivity issues and they only started happening after I started indexing posts with Meilisearch. I'd like to get this issue resolved and everything between Akkoma/Meilisearch working smoothly so I can see whether the issues with Mumble still happen. All three are running in LXD on the same host and there might be some weird LXD networking things going on. ### Logs Sample of the logs before the command exited ``` 17:49:21.595 [debug] QUERY OK source="objects" db=35.8ms SELECT o0."id", o0."data", o0."inserted_at", o0."updated_at" FROM "objects" AS o0 WHERE (data->>'type' = 'Note' AND (data->'to' ? $1 OR data->'cc' ? $2)) ORDER BY data->'published' DESC ["https://www.w3.org/ns/activitystreams#Public", "https://www.w3.org/ ns/activitystreams#Public"] 17:49:21.878 [debug] QUERY OK source="objects" db=15.9ms SELECT o0."id", o0."data", o0."inserted_at", o0."updated_at" FROM "objects" AS o0 WHERE (data->>'type' = 'Note' AND (data->'to' ? $1 OR data->'cc' ? $2)) ORDER BY data->'published' DESC ["https://www.w3.org/ns/activitystreams#Public", "https://www.w3.org/ ns/activitystreams#Public"] 17:49:22.173 [debug] QUERY OK source="objects" db=9.0ms SELECT o0."id", o0."data", o0."inserted_at", o0."updated_at" FROM "objects" AS o0 WHERE (data->>'type' = 'Note' AND (data->'to' ? $1 OR data->'cc' ? $2)) ORDER BY data->'published' DESC ["https://www.w3.org/ns/activitystreams#Public", "https://www.w3.org/ ns/activitystreams#Public"] 17:49:22.428 [debug] QUERY OK source="objects" db=36.3ms SELECT o0."id", o0."data", o0."inserted_at", o0."updated_at" FROM "objects" AS o0 WHERE (data->>'type' = 'Note' AND (data->'to' ? $1 OR data->'cc' ? $2)) ORDER BY data->'published' DESC ["https://www.w3.org/ns/activitystreams#Public", "https://www.w3.org/ ns/activitystreams#Public"] Indexed 1100000 entries 17:49:37.469 [debug] QUERY OK source="objects" db=861.3ms SELECT o0."id", o0."data", o0."inserted_at", o0."updated_at" FROM "objects" AS o0 WHERE (data->>'type' = 'Note' AND (data->'to' ? $1 OR data->'cc' ? $2)) ORDER BY data->'published' DESC ["https://www.w3.org/ns/activitystreams#Public", "https://www.w3.org/ ns/activitystreams#Public"] 17:49:37.470 [debug] QUERY OK db=0.2ms rollback [] ** (Jason.DecodeError) unexpected end of input at position 0 lib/jason.ex:92: Jason.decode!/2 lib/pleroma/search/meilisearch.ex:61: Pleroma.Search.Meilisearch.meili_put/2 lib/mix/tasks/pleroma/search/meilisearch.ex:88: anonymous fn/1 in Mix.Tasks.Pleroma.Search.Meilisearch.run/1 (elixir 1.14.3) lib/stream.ex:481: anonymous fn/4 in Stream.each/2 (elixir 1.14.3) lib/enum.ex:4751: Enumerable.List.reduce/3 (elixir 1.14.3) lib/stream.ex:1026: Stream.do_transform_inner_list/7 (elixir 1.14.3) lib/stream.ex:1811: Enumerable.Stream.do_each/4 nofile:1: (file) pleroma:/opt/pleroma# ``` ### Severity I cannot use it as easily as I'd like ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
amolith added the
bug
label 2023-08-23 03:47:24 +00:00
Author

I shut down the Meilisearch container and switched back to RUM indexes and everything seems to be fine again.

I shut down the Meilisearch container and switched back to RUM indexes and everything seems to be fine again.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#635
No description provided.