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

Large imports give a 413 Payload Too Large error message #142

Open
ditmarvisser opened this issue Nov 11, 2022 · 3 comments
Open

Large imports give a 413 Payload Too Large error message #142

ditmarvisser opened this issue Nov 11, 2022 · 3 comments
Assignees
Labels
kind/bug Something isn't working priority/high

Comments

@ditmarvisser
Copy link

Describe the bug
When importing a new package the import failes if the number of vocabs is too large. In my testing the number of vocabs seems to be around 1100. The error in the console is "413 Payload Too Large error message". The json file I want to upload is 126 Kb.

I have found that nginx has a default limit of 1Mb on upload files. I have set the value of client_max_body_size in /etc/nginx/conf.d/default.conf to 64M, restarted the container, but that does not seem to make a difference.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Packages
  2. Click on Import
  3. Import the following file: https://pastebin.com/ztL2dhmR
  4. See error in the browser console

Expected behavior
The package gets imported succesfully.

Additional context
Here is an even larger file I was originally trying to import. This is 424 Kb.

@noctera
Copy link
Member

noctera commented Nov 11, 2022

Hi @ditmarvisser,
thanks for reporting this issue. I have just looked at it on my local machine and could reproduce it. This isn't an error coming from your Nginx configuration. This is an error comming from our Expressjs configuration. We just haven't noticed it, as no one of us tried to upload a file that large.
As it seems Expressjs is limiting the size of the upload, the body-parser can parse. According to the internet, this can be fixed with some lines of code. We will try to fix it as far as we can.

PS: Thanks for the other feature request, you have sent us. We really need an option to add multiple packages together :)

Greetings, Noctera

@noctera
Copy link
Member

noctera commented Dec 23, 2022

@ditmarvisser This issue is fixed now. But the final release will take some time. However if you already want to use it, you can switch to the experimental branch, or use the experimental docker image build.

Information about how to set the limit (default 1mb), can be found in this pull request vocascan/vocascan-server#96

@seyar
Copy link

seyar commented Feb 1, 2023

Also I could not import file from @ditmarvisser from paste bin. There are wrong format.
Correct format I found at vocascan/vocascan-server#54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working priority/high
Projects
Status: 🗒️ ToDo
Development

No branches or pull requests

3 participants