Node-red-node-mysql stops working after some time

Hello everyone ,

Every time after about an hour ( more or less ) node red stops reacting. Some nodes still work like the gui input buttons but others like MYSQL stop working.

i tried to solve it with the mysqlReconnectTime at 15000,30000,60000 in settings.js but still stops...
even i tried with 1800000 (30 mins) then 1200000 (20mins) but still the same problem . Also i tried to keep alive the connection with doing select 1 every 5 mins but nothing changed.

the mysql node is still green with the message connected.

the only way to solve it is to restart node-red or doing a deploy.

i am using the node-red-node-mysql version 0.1.1

Does any one faced this problem before please ?

Hi, there is a new beta version you could try. It has to be installed manually by going into your user directory and then running. npm i node-red-node-mysql@next and then restarting node-red. Any feedback much appreciated

1 Like

Just to clarify Dave's comment, it is the folder where your flows file, settings.js etc are that you need to run the command from, that is usually the .node-red folder

2 Likes

thanks @dceejay for the quick answer , it will solve the problem ? . the version wich i'm using is not the correct one ? I mean that version of node mysql has this bug ?

Hi,.... I don't know.... :slight_smile: the current latest version does appear to have memory leak so that over time it may either hang Node-RED or fail in some way... the new beta uses a different library and also fixes that bug... so it may fix your problem but I don't know... I am trying to get feedback as the underlying library is a different one so we want to be sure it is as near to 100% compatible as possible before releasing it widely... but if it helps fix your issue then that is extra good.

1 Like

I will test the beta version as soon as possible and go back with good news :smiley: but i need to find let's call it a " temporary solution " to keep the node alive.

Any suggestions please ?

That IS my suggestion

1 Like

Well , I Updated the mysql node and it's in the process of testing .

1 Like

Hello , like i said i updated to version 1.0.0beta5 and it seems no disconnection from the database, the node is working about 24hours , but i had too much disconnection from the wifi network, its about every 2, 3 mins !! .
So my question : is that disconnection caused by node mysql ???
when i did the update , the problem appeared !!

Thanks

I can’t think how it could affect the WiFi.

1 Like

Well , The node is working perfectly until yesterday , will keep you update @dceejay .

Thanks.

Hello it is me again :slight_smile: after the update the node is working without stop, but this errors appeared 2 days ago and appeared again Today : TypeError: Cannot read property 'release' of undefined. As we see in the screenshot node red restarded. Also sometimes he does it again successively.
error node mysq stops node-red 2

It seems he is trying to get the connexion if he didn't succeed it will fill the err variable and release the connexion.

Any help please ? @dceejay @Colin

Hi - I do have a beta that should fix this problem - you can load it manually by going into your node-red user directory cd ~/.node-red and running npm i node-red-node-mysql@next . This should fix the memory leak but uses a different underlying library so I'm trying to get as much feedback as possible before releasing it fully.

Let me know how you get on. Thanks

1 Like

I already updated it to beta version :smiley: but in the log I don't have any errors related to memory.

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