node-red / node-red/node-red-nodes

NodeRed Pool closed and EHOSTUNREACH repetitive error

Open
#1,115 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
13h 57m
Merged PRs (30d)
3

Description

Which node are you reporting and issue on?

node-red-node-mysql: 2.0.0

flows.json

What are the steps to reproduce?

No response

What happens?

Description
When connecting from Node-RED to remote MySQL servers that are intentionally powered off nightly, the node-red-node-mysql node starts emitting repetitive EHOSTUNREACH errors in the Debug pane. This is expected while the DB is down, but it’s excessively noisy.
More importantly, after the remote DB server comes back online and connections begin succeeding again, the node still intermittently emits pool closed errors in the Node-RED Debug pane—even though queries are succeeding. This creates false alarms and makes monitoring unreliable.

Proposed solutions in internet mention restarting the whole NodeRed container, but this is obviously not a solution.

Environment

flows.json

Node-RED: v3.0.2
node-red-node-mysql: 2.0.0

What did you expect to happen?

Have fewer error messages, and them dissapearing after a proper connection

Example flow

[
{
"id": "1125078a23e3b0d0",
"type": "mysql",
"z": "c187ccce3b1d0ea3",
"g": "1ed6f19507dfa98b",
"mydb": "0fbd1cccf0ccdbf2",
"name": "",
"x": 630,
"y": 460,
"wires": [
[
"832e554eb8152e86"
]
]
},
{
"id": "0fbd1cccf0ccdbf2",
"type": "MySQLdatabase",
"name": "QS600 New",
"host": "172.16.10.252",
"port": "3306",
"db": "quicksun",
"tz": "",
"charset": "UTF8"
}
]

Environment
  • Node-RED version: v3.0.2
  • Node.js version: v16.16.0
  • npm version: 8.11.0
  • Platform/OS: Synology NAS & docker

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the provided example flow against a MySQL server that is powered off and then restored. Inspect the connection and pool handling in node-red-node-mysql 2.0.0. Done means EHOSTUNREACH reporting is not excessively repetitive and pool closed errors stop after connections recover while queries succeed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mysql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.