Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message: JSON payload is larger than allowed #4301

Closed
Nikopol484 opened this issue Jan 5, 2024 · 4 comments
Closed

Error message: JSON payload is larger than allowed #4301

Nikopol484 opened this issue Jan 5, 2024 · 4 comments
Labels
bug Something isn't working as expected

Comments

@Nikopol484
Copy link

Nikopol484 commented Jan 5, 2024

I got next error when I'm try to upload synonyms

Error message: JSON payload (4696120 bytes) is larger than allowed (limit: 2097152 bytes)
Full error:

`Traceback (most recent call last):
File "/home/administrator/.local/lib/python3.8/site-packages/meilisearch/_httprequests.py", line 107, in __validate
request.raise_for_status()
File "/home/administrator/.local/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://10.0.1.61:7700/indexes/sello_prod/settings/synonyms

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "algolia_synonyms.py", line 36, in
m_index.update_synonyms(meili_syn)
File "/home/administrator/.local/lib/python3.8/site-packages/meilisearch/index.py", line 1253, in update_synonyms
task = self.http.put(self.__settings_url_for(self.config.paths.synonyms), body)
File "/home/administrator/.local/lib/python3.8/site-packages/meilisearch/_httprequests.py", line 89, in put
return self.send_request(requests.put, path, body, content_type)
File "/home/administrator/.local/lib/python3.8/site-packages/meilisearch/_httprequests.py", line 57, in send_request
return self.__validate(request)
File "/home/administrator/.local/lib/python3.8/site-packages/meilisearch/_httprequests.py", line 110, in __validate
raise MeilisearchApiError(str(err), request) from err
meilisearch.errors.MeilisearchApiError: MeilisearchApiError. Error code: internal. Error message: JSON payload (4696120 bytes) is larger than allowed (limit: 2097152 bytes). Error documentation: https://docs.meilisearch.com/errors#internal Error type: internal`

Meilisearch version 1.4.2
In toml file
http_payload_size_limit = "1Gb"

@curquiza curquiza transferred this issue from meilisearch/documentation Jan 8, 2024
@curquiza
Copy link
Member

curquiza commented Jan 8, 2024

Hello @Nikopol484

I moved the issue into the right repository 😊

Can you send us:

  • The command you run to launch Meilisearch?
  • you config file?
  • the payload you tried to send when getting this error?

⚠️ Hide the master key when you send information on this issue

@curquiza curquiza added the needs more info This issue needs a minimal complete and verifiable example label Jan 8, 2024
@Nikopol484
Copy link
Author

meilisearch.toml.txt
Config file
synonyms.json
Payload
Call PUT method {{url}}/indexes/{{indexUID}}/settings/synonyms
via python meilisearch library (0.28.4)

@curquiza
Copy link
Member

Hello @Nikopol484

This issue has been fixed recently and the fix will be available in a stable release on Monday 😊
In the meantime, if you really need a quick fix, you can already test our release candidates (RC) here

@curquiza curquiza added bug Something isn't working as expected and removed needs more info This issue needs a minimal complete and verifiable example labels Jan 10, 2024
@Nikopol484
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants