question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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: image 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:closed
  • Created 9 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

11reactions
christroutnercommented, Jun 13, 2017

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.

1reaction
kengrescommented, Apr 11, 2019

@christroutner this just saved my ass. almost 2 years later. thanks mate

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found