I am running Node-RED v3.1.3 locally under Node.js v20.11.0 (Windows 11).
Following the example provided here Import a File into Node-RED with Dashboard 2.0 • FlowFuse
, the upload procedure fails for files larger tha approximately 1Mb (no message transmitted from the template node to a debug node). Any clues for why this is happening? This is an important limitation in many realistic use cases. Any help is highly appreciated.
Max payload sizes for native Node-RED out of the box are 5mb, this is controlled by the apiMaxLength
option in the settings.js
If you are using nginx to reverse proxy for Node-RED then the default max payload size is 1mb. This is controlled by settings the client_max_body_size
directive in the nginx config file.
You will need to adjust both of these to be able to upload anything larger than those limits.
These limits apply to all HTTP endpoints provided by Node-RED or proxied by nginx.
In both cases either Node-RED or Nginx will be returning a 429 HTTP Status code.
Thanks for the quick replay and suggestion. However, I am not running under nginx (not even installed) and changing apiMaxLength has no effect. Any other ideas?
Then we need to see the details from the browser developer tools for the upload and what http status code is being returned.
It would probably also help to have the node-red logs from the time of the upload as well.
Ahh, actually I’ve just worked this out.
The dashboard is using socket.io under the covers and that has a max message payload default of 1mb, so this is not hitting the HTTP Payload limits.
I’ll ask @joepavitt to have a look and see if we can tweak the default.
Have opened an issue: SocketIO Packet Limit of 1MB · Issue #509 · FlowFuse/node-red-dashboard · GitHub