I am having a problem with VERY slow response in NodeRed, Modbus, UIBuilder

Excuse me if I don't put this in the right place, don't ask the question correctly, or anything else a new person would do.

I am trying to develop a NodeRed system to run several motors through an Eaton PLC. Ladder logic I'm good at but NodeRed I'm new. What happened is that my friend had his Eaton HMI to his PLC has started having trouble. It's 12 years old and dying. I am trying to develop a Node Red (using UI Builder) custom user interface for him, running on a linux Ubuntu 5.4.0-137-generic fanless computer. It communicates to the PLC using the ModBus node. When I first start it up it runs great. All the screen buttons instantly turn outputs on and off and everything is good. My screen buttons react instantly to the change in output condition reported from the PLC, through Modbus, to node red, and to my screens in UIBuilder. After about an hour the response becomes very slow. It still eventually works, but ist slow. For instance, if I click the start button on the screen, it can take upwards of 5 seconds for the PLC to respond. After an hour of sitting, just doing nothing but monitoring, I get a message saying “Sorry, the program “node” closed unexpectedly.

Your computer does not have enough free memory to automatically analyze the problem and send a report to the developers.”

My memory is 8 gigabytes, and 3 gigabytes is “used” when this happens. All I have to do to get it all back to running correctly again is close and restart NodeRed.

I’m not what is causing this to happen. Is it a problem with ModBus polling to fast or something stupid I’ve done?

I hope I’m not asking to much of NodeRed to control all this through UIBuilder, using ModBus.

Any help would be appreciated, and If you need other information I will upload it. I’m just not sure where to start. Like I said, I’m new to this.

Hi David,

I'm afraid that I don't use modbus so I may not be able to help too much on that side of things. But we can start with the general setup.

I'm fairly sure there aren't memory leaks in uibuilder. I did spend quite a bit of time a couple of releases ago double-checking that Node-RED memory didn't creep up when using uibuilder. Though it isn't the most light-weight of nodes given all that it does. But clearly the core size isn't an issue because, as you say, at start-up everything works well and that is where uibuilder allocates the most resources.

But clearly something is chewing through resources. So a quick check on the host device.

The biggest issue I see immediately is that you are using Ubuntu v5.4 which went end of life in October 2006 - 16 years ago!!!! Frankly, I'm amazed that you can even run Node-RED. Can you please share what versions of node.js, Node-RED and uibuilder you are using?

Also, are you running a Linux desktop on that device as well as Node-RED. And if so, are you using the desktop to run the browser you are using?

Can you also check on the CPU utilisation and SWAP usage as the device starts to slow down?

No, that shouldn't be an issue, lots of us have run more on old Raspberry Pi's with far less memory.

As I said I'm new to this. What I gave you was the kernel, the version is 18.04 Bionic. Sorry. The other data I will get when I get home tonight. I will post it then. Thank you for the assistance.

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