meilisearch icon indicating copy to clipboard operation
meilisearch copied to clipboard

movies.json crash when imported on Windows

Open curquiza opened this issue 1 year ago • 3 comments

Looks like a user reported a crash here: https://github.com/meilisearch/meilisearch/issues/3800#issuecomment-1713394918

When importing the movie.json dataset available in the getting started of the docs, Meilisearch return an internal error

The movie.json import perfectly works on Linux and macos.

👉 Windows bugs are not the priority for the Meili team, so we need someone from the community to check if they can reproduce the bug on their machine, and then, someone to fix the bug. Please try to reproduce the bug with the latest version of Meilisearch

Reported on v1.3.3

curquiza avatar Sep 12 '23 11:09 curquiza

I started a local windows instance downloaded from https://github.com/meilisearch/meilisearch/releases/download/v1.3.3/meilisearch-windows-amd64.exe with ./meilisearch-windows-amd64.exe --master-key=masterKey and ran all the integration tests in the dart repository https://github.com/meilisearch/meilisearch-dart

here are the results:

  1. any call to updateFilterableAttributes AFTER documents are added, crashes with an internal error:

    thread 'indexing-thread:7' panicked at 'the allocator is unable to allocate that much memory (1428747712 bytes requested)', C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\grenad-0.4.4\src\sorter.rs:350:9
    stack backtrace:
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    Rayon: detected unexpected panic; aborting
    

    and the instance is bricked, meaning if I restart it again, it crashes with the same error.

    btw I have no idea why is it trying to access C:\Users\runneradmin, since it's not my user name.

    I suppose there is an issue with re-indexing documents in general on windows.

    also it takes VERY long to add documents in general on windows vs docker

  2. all other tests are working, including document addition in bulk/patches and updating index settings BEFORE documents are added.

similar issue: https://github.com/meilisearch/meilisearch/issues/4027

UPDATE: passing --max-indexing-memory 0 fixes all issues, and all integration tests are running normally.

ahmednfwela avatar Sep 12 '23 18:09 ahmednfwela

Thank you very much @ahmednfwela, it will help the users coming to fix the issue. In more general I recommend using Linux in production with Meilisearch, this is where we do most of our tests.

Also to ease your production with Meilisearch, you can use our cloud offer to manage Meilisearch in an easier way. The migration to another version of Meilisearch can only be done with one click.

curquiza avatar Sep 13 '23 08:09 curquiza

Can someone check if the issue is still present with v1.6.0? 🙏

curquiza avatar Feb 12 '24 13:02 curquiza

Unlike the previous indicated error, I failed at Adding movies.json

curl -X POST 'http://localhost:7700/indexes/movies/documents?primaryKey=id' -H 'Content-Type: application/json' -H 'Authorization: Bearer aSampleMasterKey' --data-binary movies.json
{"message":"The `json` payload provided is malformed. `Couldn't serialize document value: expected value at line 1 column 1`.","code":"malformed_payload","type":"invalid_request","link":"https://docs.meilisearch.com/errors#malformed_payload"}

version: v1.6.2

Elkiwa avatar Feb 25 '24 07:02 Elkiwa

that's because you forgot the @ before movies.json

curl \
  -X POST 'http://localhost:7700/indexes/movies/documents?primaryKey=id' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer aSampleMasterKey' \
  --data-binary @movies.json

ahmednfwela avatar Feb 25 '24 13:02 ahmednfwela

that's because you forgot the @ before movies.json

curl \
  -X POST 'http://localhost:7700/indexes/movies/documents?primaryKey=id' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer aSampleMasterKey' \
  --data-binary @movies.json

Oh, sorry. I thought it would work on PowerShell also, but the '@' sign only works in Bash and stated on Quick start page already.

I finished executing all the steps on Quick start page and seems like no issue.

Elkiwa avatar Feb 25 '24 16:02 Elkiwa

Thank you @Elkiwa & @ahmednfwela

Can I close the issue or @ahmednfwela you still have the problem with v1.6.2?

curquiza avatar Feb 26 '24 10:02 curquiza

nope, all good

ahmednfwela avatar Feb 26 '24 13:02 ahmednfwela

thank you for your reactivity @ahmednfwela a pleasure to have you in the community

curquiza avatar Feb 26 '24 13:02 curquiza