UI-Builder - max length uibuilder.send({})

Hi,

First: UI Builder is absolutely awesome :star_struck: :smiling_face_with_three_hearts: That being cleared I do have a question that I cannot find the answer for.

I'm trying to send very large objects/strings with uibuilder.send and there appears to be a maximum length. I haven't been able to find it and instead of guessing to find it I thought I'd ask:

  1. Is this intentional?
  2. If so, what's the limit?

I want to make clear, this is no deal breaker as it can be easily worked around, but if it is unintentional I'd better tell about it :wink:

Thanks for the excellent node/work. Super fun to work with.

Hi Henrik, thanks for the praise, very welcome.

The limit on msg size is set by Socket.IO which is the library that provides the websocket comms. I think that I do mention it somewhere, at least in one of the changelog entries, perhaps even in the example code for the uibuilder of settings.js.

One of the recent changes opened up the ability to pass options to socket.io in settings.js and that is where you change the limit.

If you can't find the setting, let me know in this thread and I'll dig out the details.

1 Like

Sharing the link from the uibuilder v5 documentation that mentions about the setting you discussed

By editing the NR settings.js file and adding a uibuilder configuration

// socketOptions: {
        //     // Make the default buffer larger (default=1MB)
        //     maxHttpBufferSize: 1e8 // 100 MB
        // },
1 Like

Thanks @TotallyInformation and @UnborN

However... It appears to make no difference, so I guess I might have actually put the text in the wrong place. I put it at the very end of my settings.js file (in the/.node-red folder) I first tried to put it outside the module.export = {} but that prevented NodeRed from even starting, so I put it inside that like everything else in settings.js and then NodeRed starts just fine, but the settings does not appear to take effect... Here's the very, very end of my (otherwise completely default settings.js

image

Perhaps you can spot some obvious error on my psrt (which I'm sure is the issue). Thanks again for your kind help.

EDIT:
After checking in NR I could confirm the setting was loaded:
image

And... It now indeed works flawlessly. I guess perhaps something was cached and was eventually replaced. Anyway. It now works, so thanks a million both of you :clap: :partying_face:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.