Closed DaAwesomeP closed 4 months ago
Request failed with status code 413
HTTP Status Code 413 means "Content Too Large": https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413
So something is not quite right yet... @luc122c Dou you know what could be the culprit?
It seems that maybe GitHub does not like such large messages in issues since I got the equivalent error when pasting into the UI.
Yes, GitHub has a character limit (65536 according to your screenshot), and the error message that includes the uploaded file as an base64-encoded string is larger than that.
But the error message "Request failed with status code 413" is not from GitHub but from the fixture upload, so it's a server error that we can fix.
So something is not quite right yet... @luc122c Dou you know what could be the culprit?
My initial thought was that 50mb was being interpreted as MegaBits (rather than MegaBytes). However, express.json uses uses the bytes library, which only seems to interpret Bytes, not Bits.
@FloEdelmann Is the site going through Cloudflare or any other service that could be imposing a limit?
Nope, no CDN or (external) reverse proxy. Maybe the Nginx reverse proxy and Express interpret the file size differently?
@FloEdelmann what is client_max_body_size
set to in Nginx for that location
block? Default is 1m
.
Maybe try setting it to 51M
(1MB more than 50 to allow for rest of HTTP request with a theoretical 50MB file)?
http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
Seems like the default applies then: https://github.com/OpenLightingProject/open-fixture-library/blob/master/server/nginx-site-available
I could open a pull to modify nginx-site-available
, but it is probably easier for the server admin to just try inserting client_max_body_size 51M;
in production.
I'd appreciate a PR, then I can apply it on production.
As a followup to #3832, I got the following when attempting to submit.
This file was downloaded from https://gdtf-share.com/userPage.php?name=Robe%20Lighting%20s.r.o.&page=Revisions&fixtureId=472
Unfortunately, there was an error while uploading. Please copy the following data and[ manually submit them to GitHub ](https://github.com/OpenLightingProject/open-fixture-library/issues/new).
There seems to be a max char limit on GitHub: