Node Red stops functioning after some time ( mysql )

539 views
Skip to first unread message

esc...@missionroom.nl

unread,
Feb 10, 2017, 7:58:11 PM2/10/17
to Node-RED
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 10000 in settings.js but still stops...

the mysql node is still green with the message connected.
only way to solve it is to restart node-red
i am using the node-red-node-mysql 

any one have the same problem??
 

Colin Law

unread,
Feb 11, 2017, 3:50:42 AM2/11/17
to node...@googlegroups.com
Are there any messages in the console (if you started node-red in a
terminal) or in syslog when it stops responding?

Are you using mqtt? If so then run mosquitto_sub (or whatever mqtt
client you use) in a terminal, watching all your topics and make sure
you have not got an mqtt loop, that is something writing to mqtt,
which is then picked up by a an mqtt in node and this (possibly via a
tortuous route) ends up causing it to be published again, and so on.

Colin

esc...@missionroom.nl

unread,
Feb 11, 2017, 6:18:47 AM2/11/17
to Node-RED
i deleted all mqtt stuff
Started the node red server again

And again it stopped.

No extra lines in the logs after started flows

When i just move a node and click Deploy the logs prints this : [info] Stopping flows 
After that no starting or started



Op zaterdag 11 februari 2017 09:50:42 UTC+1 schreef Colin Law:

Colin Law

unread,
Feb 11, 2017, 7:10:01 AM2/11/17
to node...@googlegroups.com
Can you post the output when you start node-red please so we can see
the versions and so on.

Colin
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/750c5c55-915b-4b0e-a548-bcff56993db4%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

esc...@missionroom.nl

unread,
Feb 11, 2017, 9:15:09 AM2/11/17
to Node-RED

Started Node-RED graphical event wiring tool..

Welcome to Node-RED

===================

11 Feb 15:07:41 - [info] Node-RED version: v0.15.3

11 Feb 15:07:41 - [info] Node.js  version: v4.7.2

11 Feb 15:07:41 - [info] Linux 4.4.38-v7+ arm LE

11 Feb 15:07:44 - [info] Loading palette nodes

pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/lib/node_modules/node-red/nodes/core/hardware/nrgpio.py info

pam_unix(sudo:session): session opened for user root by (uid=0)

pam_unix(sudo:session): session closed for user root

11 Feb 15:07:54 - [info] Dashboard version 2.2.1 started at /ui

11 Feb 15:08:01 - [info] Settings file  : /home/pi/.node-red/settings.js

11 Feb 15:08:01 - [info] User directory : /home/pi/.node-red

11 Feb 15:08:01 - [info] Flows file     : /home/pi/.node-red/flows_newqusax.json

11 Feb 15:08:01 - [info] [BLE] Set up done

11 Feb 15:08:02 - [info] Server now running at http://127.0.0.1:1880/

11 Feb 15:08:02 - [info] Starting flows

11 Feb 15:08:03 - [info] Started flows


Op zaterdag 11 februari 2017 13:10:01 UTC+1 schreef Colin Law:

Dave C-J

unread,
Feb 11, 2017, 11:43:48 AM2/11/17
to node...@googlegroups.com
I see a BLE node in there ? - does removing that help ?
Stopping reacting is typical of running out of resources... most normally memory. Often this is due to something not handling "errors" correctly - by errors I mean things like failed connections, repeated connections, (or too much traffic). 
Having said that we have had reports of mysql not staying connected. Can you check you are on the latest version of that node ? 0.0.12

esc...@missionroom.nl

unread,
Feb 11, 2017, 3:24:37 PM2/11/17
to Node-RED
ok lets see now, i disabled the ble nodes

I also found a lot unused nodes at the config tab.
Deleted all these 1 by 1, is there a faster way to do it?

The version of mysql is 0.0.12

Thanks for helping me out!

---

and again stopped working, the message below
Maybe it is because the database connection is with an outside database on a plesk server???

11 Feb 19:41:20 - [info] Started flows

11 Feb 20:40:24 - [error] [mysql:acfe0daa.7fcb28] Error: read ETIMEDOUT

11 Feb 20:40:24 - [error] [mysql:61d330b9.4e7238] Error: read ETIMEDOUT

11 Feb 20:40:24 - [error] [mysql:61d330b9.4e7238] Error: read ETIMEDOUT

11 Feb 20:40:24 - [error] [mysql:2f45c07f.06dcb] Error: read ETIMEDOUT

11 Feb 20:40:24 - [error] [mysql:b646a9b2.687a48] Error: read ETIMEDOUT

11 Feb 20:40:24 - [error] [mysql:acfe0daa.7fcb28] Error: read ETIMEDOUT

11 Feb 20:40:24 - [error] [mysql:acfe0daa.7fcb28] Error: read ETIMEDOUT

11 Feb 20:40:24 - [error] [mysql:61d330b9.4e7238] Error: read ETIMEDOUT

11 Feb 20:40:24 - [error] [mysql:61d330b9.4e7238] Error: read ETIMEDOUT

11 Feb 20:40:24 - [error] [mysql:2f45c07f.06dcb] Error: read ETIMEDOUT

11 Feb 20:40:24 - [error] [mysql:b646a9b2.687a48] Error: read ETIMEDOUT







Op zaterdag 11 februari 2017 17:43:48 UTC+1 schreef Dave C-J:

Julian Knight

unread,
Feb 12, 2017, 8:06:55 AM2/12/17
to Node-RED
If you've a lot to get rid of, it might be easier to manually delete the ~/.node-red/node_modules folder (assuming you have a standard installation). Then reinstall just the ones you actually need. You can see that ones in use in the Manage Pallet sidebar, they say "in use"

To make things easier - and make it a lot easier to rebuild your environment should you need to, you can:

cd ~/.node-red
npm init
-y


Then edit package.json to add the nodes you want or install the nodes using the command line:

npm install node-red-contrib-xxxxxx --save


This adds them to the package.json file and should you ever need to reinstall everything (which occasionally happens when moving to a new version of Node.JS for example or after some disaster), you can simply do:

cd ~/.node-red
npm install

esc...@missionroom.nl

unread,
Feb 12, 2017, 2:01:26 PM2/12/17
to Node-RED
Update all to latest version and still the same problems :-(

Could it be the external database? instead of local?



Op zondag 12 februari 2017 14:06:55 UTC+1 schreef Julian Knight:

esc...@missionroom.nl

unread,
Feb 12, 2017, 4:46:02 PM2/12/17
to Node-RED
updates didn't solve the problem.

started a mysql server locally and copied the data to it.

now after one hour it is still running
so it seems to be the problem that the database is outside of node red
any ideas to solve this?


Op zondag 12 februari 2017 20:01:26 UTC+1 schreef esc...@missionroom.nl:

Dave C-J

unread,
Feb 12, 2017, 4:52:49 PM2/12/17
to node...@googlegroups.com
I'm guessing it must be the "management" of the connection to the remote server. Please raise an issue against the node-red-nodes project on github and we'll have a look when we get a moment. (or someone else can jump in :-)

esc...@missionroom.nl

unread,
Feb 28, 2017, 4:53:28 AM2/28/17
to Node-RED
Solved with the latest version!
;-)

Op zondag 12 februari 2017 22:52:49 UTC+1 schreef Dave C-J:
Reply all
Reply to author
Forward
0 new messages