Express error: request entity too large
See original GitHub issueI created a new post with too much content, and express started throwing errors.
Saving Failed!
I inspect in to it and its related to express data post limit. I have to change the file core/server/middleware/index.js
to make it work
// Body parsing
blogApp.use(bodyParser.json({limit: '50mb'}));
blogApp.use(bodyParser.urlencoded({extended: true, limit: '50mb'}));
Is there a better way to set limit via config.js ??
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
javascript - Error: request entity too large - Stack Overflow
The HTTP 413 Payload Too Large response status code indicates that the request entity is larger than limits defined by server; the server...
Read more >How to Fix “413 Request Entity Too Large” Error in Node.js
As explained in MDN, the HTTP 413 Payload Too Large response status code indicates that the request entity performed by the client is...
Read more >How to fix the request entity too large error in Express - Reactgo
In express, we use the body-parser middleware to parse the data from the incoming requests, and also it sets the default request body...
Read more >Nodejs 413 request entity too large error | End Your If
There are several ways to resolve this issue. First, you should check with your hosting provider to see what settings they recommend.
Read more >What Is a 413 Request Entity Too Large Error & How to Fix It
A 413 HTTP error code occurs when the size of a client's request exceeds the server's file size limit. This typically happens when...
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
It would be nice to have a dedicated setting instead of having to manually change that lines.
I know 1mb is a reasonable limit for textual content, but I plan to add a few base64-encoded pictures in my posts. In such scenario, that limit could be too low.
@ErisDS I also thought that my nginx was causing the problem, but as I started debugging, it as not nginx. Nginx has no error logs, and the max-post size was already 100mb there.
Here is the post which was causing the problem in creation. Everything got fixed after I have added added 2 lines of code mentioned above.
http://blog.smugglr.co/2015/10/23/we-made-it-open-season-and-got-100s-of-agencies-as-users/
@ErisDS I think you misread the limit size, its
100kb
not100mb
on https://github.com/expressjs/body-parser#limit