[Error: connect ETIMEDOUT]
See original GitHub issueHello,i am having this error in my production server ,the same code its working on my UAT server. its giving me [Error: connect ETIMEDOUT]
{ [Error: connect ETIMEDOUT]
errorno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
fatal: true }
mysql connection lost
my code-------
var config = require('./config')('prod');
var mysql = require('mysql');
module.exports = function() {
var connection = mysql.createConnection({
host : config.DATABASE_HOST,
user : config.DATABASE_USER,
password : config.DATABASE_PASS,
database : config.DATABASE_NAME,
multipleStatements : true
});
connection.connect(function(err) {
if (!err) {
console.log("mysql connected")
} else {
console.log("mysql connection lost");
}
});
return connection;
}
The db is hosted into a remote server and the DATABASE_USER has all the permission it needed. thanks in advance .
Issue Analytics
- State:
- Created 7 years ago
- Comments:29 (9 by maintainers)
Top Results From Across the Web
What could cause "connect ETIMEDOUT" error when the URL ...
The URL above cause some issues because HTTP does not exist at the beginning of URL so Just change it to it should...
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 >How do I resolve the error: connect etimedout
ETIMEDOUT (Operation timed out): A connect or send request failed because the connected party did not properly respond after a period of time....
Read more >HOW can i solve the Error: connect ETIMEDOUT when try to ...
The error always states the Error: connect ETIMEDOUT… the funny thing is that i can connect the cluster with mysql client terminal and...
Read more >Error: connect ETIMEDOUT - Salesforce Stack Exchange
ETIMEDOUT (Operation timed out): A connect or send request failed because the connected party did not properly respond after a period of time....
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
Hi @cashFLO960 the error
Error: connect ETIMEDOUT
is from the Node.js networking code. It means that a TCP connection could not be established to your MySQL server. Usually this is a networking or firewall issue.Hi there,
When creating an RDS instance via the AWS web console and when following “default” settings, AWS puts your instance into a security group with inbound rules set to your machine IP. Also, everything will work when running on your local machine but will timeout when doing the same thing in Lambda.
Solution: modify the default security group inbound rules associated with your db instance.