2

I'm using 'mysql' and 'express-myconnection, when I'm running in localhost and some internet connections using AWS server its working perfectly.Yet when I'm at some of other internet connections with AWS setup its give out the error,Yet those connections have some decent internet speeds.

I'm using node ver. 6.9.1.

I read these Issues were in older versions, I do need to know if anything can be done to fix it by development side without changing server it-self.

'use strict';

var mysql      = require('mysql');
var connector  = require('express-myconnection');
var dotenv     = require('dotenv').config();

var connectionOptions = {
  host    : process.env.DB_HOST,
  database: process.env.DB_NAME,
  user    : process.env.DB_USER,
  password: process.env.DB_PASS,
  port    : process.env.DB_PORT,
};
var connection = connector(mysql, connectionOptions, 'pool'); 

module.exports = connection;
Deepak Rai
  • 2,163
  • 3
  • 21
  • 36
menaka
  • 1,045
  • 1
  • 12
  • 30

1 Answers1

2

Its looks like the mySql timeout happen because my internet connection takes a longer time to connect with the server,so basically its a DNS settings issue with the router.

menaka
  • 1,045
  • 1
  • 12
  • 30