ETIMEDOUT error since v1.1.1
See original GitHub issueI have a local mysql database that I use for testing and v1.1.1 introduced some sort of bug or configuration change that is causing the error:
{ Error: connect ETIMEDOUT
at Connection._handleTimeoutError (/home/myuser/code/itemdrop/node_modules/mysql2/lib/connection.js:166:13)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
errorno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
fatal: true }
Confirmed this does not happen with v1.1.0 by downgrading my project back to that version. I’m using knexjs v0.12.2 to connect with the connection object of:
var knex = require('knex')({
client: 'mysql2',
connection: {
host: 'localhost',
user: '***',
password: '***',
database: 'mydb'
}
});
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:32 (8 by maintainers)
Top Results From Across the Web
ETIMEDOUT error in node.js while handling multiple requests
The request is sent every 500 ms. The app is working fine when there are less users. When the no of users increased...
Read more >Fixing Etimedout error - Postman
The ETIMEDOUT error means that the request took more time than the webserver configuration allows and the connection has been closed by the ......
Read more >npm install timeout error | The AI Search Engine You Control
Have checked network and firewall with IT several times and they say it all checks out. Here is the result after timeout of...
Read more >Companion App upload issue ETIMEDOUT
Opening the files works fine but uploading changes doesn't work as the app does not seem to be able to upload to the...
Read more >Error code 500| internet error - Refinitiv Developer Community
I have the following error when pull data using Python API: Error code 500 | Server Error: {"code":500,"message":"connect ETIMEDOUT ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@chunkiat82 Not sure if this relates to your case but here goes https://github.com/sequelize/sequelize/blob/2429146758e444716fe6f29897a787dd2dc37d48/lib/dialects/mysql/connection-manager.js#L85-L89
I observed connection can throw error two times, so you probably need to take care of that. Even if first error is protocol lost or something due to network error, that connection will throw another timeout error.
We need to cancel timeout handler when error event is observed, IIRC we only do that for successful connection case.
Running into this as well on Node 6.9.1, Knex 0.10 and mysql2 1.1.0 through 1.1.2 (we’ve been testing various versions). After about 12-13 hours of the process running these errors start.
We haven‘t tested the official mysql client yet, but we were previously using mariasql with Knex and weren’t experiencing this problem – it popped up upon switching to mysql2.