You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file has about 220kb. I cloned this repo and tried to change the index.js file adding the following code:
var maxApiRequestSize = settings.apiMaxLength || '5mb';
app.use(bodyParser.json({limit:maxApiRequestSize}));
app.use(bodyParser.urlencoded({limit:maxApiRequestSize,extended:true}));
but it did not help. Here is the error I am seeing:
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT 30 Jan 23:00:55 - [warn] [http in:355828e2.d32798] Error: request entity too large
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at readStream (/home/vcap/app/node_modules/node-red/node_modules/raw-body/index.js:196:17)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at getRawBody (/home/vcap/app/node_modules/node-red/node_modules/raw-body/index.js:106:12)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at read (/home/vcap/app/node_modules/node-red/node_modules/body-parser/lib/read.js:76:3)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at urlencodedParser (/home/vcap/app/node_modules/node-red/node_modules/body-parser/lib/types/urlencoded.js:115:5)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at Layer.handle [as handle_request] (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at next (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/route.js:137:13)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at Layer.handle [as handle_request] (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at metricsHandler (/home/vcap/app/node_modules/node-red/nodes/core/io/21-httpin.js:215:59)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at Layer.handle [as handle_request] (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at next (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/route.js:137:13)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at next (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/route.js:137:13)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at httpMiddleware (/home/vcap/app/node_modules/node-red/nodes/core/io/21-httpin.js:207:59)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at Layer.handle [as handle_request] (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at next (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/route.js:137:13)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at cookieParser (/home/vcap/app/node_modules/cookie-parser/index.js:56:14)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at next (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/route.js:137:13)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at Route.dispatch (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/route.js:112:3)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at Layer.handle [as handle_request] (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at /home/vcap/app/node_modules/node-red/node_modules/express/lib/router/index.js:281:22
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at Function.process_params (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/index.js:335:12)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at next (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/index.js:275:10)
2018-01-30T18:00:55.78-0500 [APP/PROC/WEB/0] OUT at Layer.handle [as handle_request] (/home/vcap/app/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
The text was updated successfully, but these errors were encountered:
This issue was originally reported by Bluemix customer via a support case.
http node cannot handle large files (it works fine in the non-Bluemix version of node-red).
I created a very simple flow:
then I tried to post a large file using curl:
curl -d "@failreq.json" -X POST http://adasilva-node-red.mybluemix.net/test
The file has about 220kb. I cloned this repo and tried to change the index.js file adding the following code:
but it did not help. Here is the error I am seeing:
The text was updated successfully, but these errors were encountered: