Request entity too large 413

#1

Hi,
I have a relatively big flow and I can't deploy anymore.
I'm still receiving this error "Request entity too large 413"
I don't know what to do... I've tried the following:

//httpAdminRoot:"/admin",
debugMaxLength: 1000,
apiMaxLength:"5mb",
in the settings obj

and the lines in the app.js
app.use(bodyParser.json({limit: '50mb'}));
app.use(bodyParser.urlencoded({limit: '50mb', extended: true}));

I'm using:
Node-RED version: v0.17.5
and
node --version
v6.9.1

nothing seems to work... could you tell me what to do?

0 Likes

#2

Hi,

what version of Node-RED are you using?

When you say you've tried the follow, some of those are settings and some of those are lines of code... so are you embedding node-red in your own app?

In general, the relevant setting here is apiMaxLength - however, prior to 0.19, if you had set httpAdminRoot to move the admin root away from / then apiMaxLength might not get applied properly.

Nick

0 Likes

#3

I'm using:
Node-RED version: v0.17.5

and
node --version
v6.9.1

and I'm embeddin node red in my app

Still no result. I need to move the httpAdminRoot to other than "/" ... and it seems that
apiMaxLength is not working

0 Likes

#4

Yes, as I said, that was broken until the 0.19 release. If you moved the admin handler, then the parser attached to the node root would get first look at the request - and that parser does not honour apiMaxLength.

0 Likes

#5

Problem solved!
I've upgraded to 0.19.1_git version.
Added the
debugMaxLength: 1000,
apiMaxLength:"5mb",
in the settings object

and also
app.use(bodyParser.json({limit: '50mb'}));
app.use(bodyParser.urlencoded({limit: '50mb', extended: true}));

but take care to declare the above lines before the RED.init line

thanks for the hint

0 Likes