Skip to content

Mysql to Http Output requiring restart of node-red #87

@ImTheDeveloper

Description

@ImTheDeveloper

I appreciate the following is not going to mean to much unless put in to a working scenario on your canvas so I have included my node json stuff.

For some reason when I query mysql and output to http as a poormans json output I have to restart node red. If I deploy and try and go to the webpage it just keeps trying to load and doesn't even seem to time out it just hangs with my loading icon spinning in chrome.

If I kill and restart node-red then it will load the page perfect every time.

It seems every re-deploy where I mess with these mysql nodes I have to then restart node-red.

For info I am using about 10 of these mysql http node scenarios just for info.

[{"id":"82707691.7d8f88","type":"MySQLdatabase","host":"127.0.0.1","port":"3306","user":"Node_Red","pass":"xxxxx","db":"Node_Red"},{"id":"23f25911.dc0da6","type":"mysql","mydb":"82707691.7d8f88","name":"node-red","x":490.8888702392578,"y":280.8888816833496,"z":"7baa0cd4.8455f4","wires":[["6a9c6556.95639c"]]},{"id":"6a9c6556.95639c","type":"function","name":"Json Stuff","func":"// The received message is stored in 'msg'\n// It will have at least a 'payload' property:\n//   console.log(msg.payload);\n// The 'context' object is available to store state\n// between invocations of the function\n//   context = {};\n\nvar jz;\n\njz = msg.payload;\n\nvar stringer = \"\";\n\nfor (var i = 0; i < msg.payload.length; i++) {\n   stringer = stringer +'{\"Latitude\":' + msg.payload[i].Latitude + ',\"Longitude\":' + msg.payload[i].Longitude +'},';\n}\nmsg.payload = stringer.slice(0, -1) + '';\n\nreturn msg;","outputs":1,"x":491.8888702392578,"y":317.3888816833496,"z":"7baa0cd4.8455f4","wires":[["5c6c0752.a393f8"]]},{"id":"6149869e.9eb678","type":"function","name":"SQL","func":"// The received message is stored in 'msg'\n// It will have at least a 'payload' property:\n//   console.log(msg.payload);\n// The 'context' object is available to store state\n// between invocations of the function\n//   context = {};\n\n\nmsg.topic = \"SELECT * FROM Tracker ORDER BY ID DESC LIMIT 1\";\n\nmsg.payload=null;\nreturn msg;","outputs":1,"x":491.88885498046875,"y":245.13894653320312,"z":"7baa0cd4.8455f4","wires":[["23f25911.dc0da6"]]},{"id":"5c6c0752.a393f8","type":"http response","name":"","x":655.8889465332031,"y":199.88888549804688,"z":"7baa0cd4.8455f4","wires":[]},{"id":"779a669c.886598","type":"http in","name":"/Home/Tracker/EndPoint","url":"/Home/Tracker/EndPoint","method":"get","x":213.88888549804688,"y":222.88888549804688,"z":"7baa0cd4.8455f4","wires":[["6149869e.9eb678"]]}]

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions