[mysql:MySql] Error: Cannot enqueue query after fatal error.

1,811 views
Skip to first unread message

Greg EVA

unread,
Aug 5, 2015, 10:39:37 AM8/5/15
to Node-RED
Hello gentlemen,

A couple weeks ago I was having data collection reliability issues relating to MQTT broker disconnects; and so I put some disconnect detection and notification in place.

After a couple of weeks with happy MQTT operation--*figuring* that data collection was working properly--I recently discovered the fact that no data was being logged to MySql; obviously much to my chagrin.

Strangely, when I connected to Node-RED's web UI, data collection resumed normally.

I went through some diagnosis exercises, and didn't really find much beyond this message repeatedly appearing in the console logs.

[warn] [mysql:MySql] Error: Cannot enqueue Query after fatal error.

I tried looking for Node-RED log files which would hopefully shed some light on the issue, but just found a line in the settings.js file indicating that there was currently no support for logging.  Is this true?

Can anyone shed any light on this?  It is obviously quite concerning if the nodes will just stop working like this.  Failing one call is one thing, but it seems that something longer term broke here (no INSERT queries submitted to MySql for around 12 days).  Seems to me that this would be more than just a warning as the node execution is either being skipped/ignored or is outright failing.

Any ideas on what I can do to avoid this sort of occurence in the future?  Should I be trapping and handling the output of the MySql query node in some way?

Regards,

Greg

Dave C-J

unread,
Aug 5, 2015, 11:35:19 AM8/5/15
to node...@googlegroups.com

Hmmm,

Looks like this should be an error not a warn, so can then be caught by the catch node. Though of course it would be useful to understand what causes it... Is the database losing connection and not reconnecting etc.

Greg EVA

unread,
Aug 5, 2015, 1:30:20 PM8/5/15
to node...@googlegroups.com
At the time that this issue arised (I checked the times), I was working on implementing my Twilio SMS alerting... which I tested, it worked, and data was still flowing into the database.  Sometime in the following hours it stopped however.
  • I deploy only changed flows, so this database logging flow should not have changed.
  • I did get a couple errors from the Twillio node as I got its configuration setup properly (2 or 3 perhaps).
  • I was disconnecting the MQTT broker in various ways throughout the testing.
  • The MySql server or connection was not affected in any way at that particular time.
  • There was a power outage a few days later, but the database logging had long since stopped.
Don't really know what else I can tell you.... :-S   Other than agreeing that it sounds more like an error and a warning!
Reply all
Reply to author
Forward
0 new messages