Unhandled error 'Request Entity Too Large'
See original GitHub issue#422 adds the ability to set a file size limit but the exception thrown is not handled properly.
Upload is stopped but the page rendered shows like this:
Server error: Error: Request Entity Too Large at Object.exports.error
It would be better if this is handled by req.flash
error
Issue Analytics
- State:
- Created 9 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to Solve the "413 Request Entity Too Large" Error - Kinsta
In a nutshell, the “413 Request Entity Too Large” error is a size issue. It happens when a client makes a request that's...
Read more >Fixing 413 Request Entity Too Large Errors - KeyCDN Support
A 413 Request Entity Too Large error occurs when a request made from a client is too large to be processed by the...
Read more >How to avoid Request Entity Too Large 413 error
To fix this, you need to increase the value of the client_max_body_size directive. This directive defines the maximum amount of data Nginx will...
Read more >413 Payload Too Large - HTTP - MDN Web Docs
The HTTP 413 Payload Too Large response status code indicates that the request entity is larger than limits defined by server; ...
Read more >Fix the 413 Request Entity Too large Error in WordPress
Are you trying to upload a file on your WordPress site and facing the 413 request entity too large an error? Then the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I appear to have fixed the issue I was having. I tried two solutions, and I’m not sure which one was the one that did it.
First, I use nginx to route https stuff on the server. I found this Stack Overflow thread that inspired me to add the following line to server block:
client_max_body_size 50M; #all file uploads up to 50 MB
I restarted nginx, but I was still getting the error. However, I didn’t reboot the server or restart keystone.js.
The second thing I tried was to add this line to keystone.init() in keystone.js:
'file limit': '50MB'
I had no idea if this was the right syntax or not. But when I restarted keystone.js, it ran and didn’t complain. I rebooted the server and when it came up I stopped getting the entity.to.large error.
Hopefully this helps someone in the future if they come across this issue.
@christroutner this just saved my ass. almost 2 years later. thanks mate