{"action":"created","issue":{"url":"https://api.github.com/repos/mysqljs/mysql/issues/2006","repository_url":"https://api.github.com/repos/mysqljs/mysql","labels_url":"https://api.github.com/repos/mysqljs/mysql/issues/2006/labels{/name}","comments_url":"https://api.github.com/repos/mysqljs/mysql/issues/2006/comments","events_url":"https://api.github.com/repos/mysqljs/mysql/issues/2006/events","html_url":"https://github.com/mysqljs/mysql/issues/2006","id":319427921,"number":2006,"title":"Can't connect to server but no error is thrown","user":{"login":"vgaltes","id":862679,"avatar_url":"https://avatars3.githubusercontent.com/u/862679?v=4","gravatar_id":"","url":"https://api.github.com/users/vgaltes","html_url":"https://github.com/vgaltes","followers_url":"https://api.github.com/users/vgaltes/followers","following_url":"https://api.github.com/users/vgaltes/following{/other_user}","gists_url":"https://api.github.com/users/vgaltes/gists{/gist_id}","starred_url":"https://api.github.com/users/vgaltes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgaltes/subscriptions","organizations_url":"https://api.github.com/users/vgaltes/orgs","repos_url":"https://api.github.com/users/vgaltes/repos","events_url":"https://api.github.com/users/vgaltes/events{/privacy}","received_events_url":"https://api.github.com/users/vgaltes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-02T06:43:36Z","updated_at":"2018-05-02T12:31:10Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI'm running NodeJS 8.11, MySQL 5.5 and mysqljs 2.15.\r\n\r\nI'm doing connections to an old machine running MySQL 5.5 on a Windows XP. When the machine is frozen (needs to press the power button to restart it but it responds to ping), when I'm trying to connect to it the connection gets stuck. I can't even see any debug traces.\r\n\r\nWhen I try to connect to that machine using MySQL Workbench I get the following error:\r\n\r\n```\r\nYour connection attempt failed for user 'monitoring' from your host to server at E0081T102:3306:\r\n  Lost connection to MySQL server at 'waiting for initial communication packet', system error: 60\r\n```\r\n\r\nI've seen that when the CPU of the host is at 100% it can lead to some problems ( #1616 ), but that's not my case. I'll be happy if I'd get a timeout and could continue.\r\n\r\nThe code I'm using to test this is:\r\n```\r\nconst mysql = require('mysql');\r\n\r\nvar connection = mysql.createConnection({\r\n    host     : 'host',\r\n    user     : 'user',\r\n    password : 'password',\r\n    database : 'database',\r\n    acquireTimeout: 2000,\r\n    connectTimeout: 2000,\r\n    timeout: 2000,\r\n    debug:true\r\n  });\r\n  \r\n  connection.connect(function(error){\r\n      console.log('error: ' + error);\r\n  });\r\n  \r\n  connection.query('SELECT 1 + 1 AS solution', function (error, results, fields) {\r\n    if (error) throw error;\r\n    console.log('The solution is: ', results[0].solution);\r\n  });\r\n  \r\n  connection.end();\r\n```"},"comment":{"url":"https://api.github.com/repos/mysqljs/mysql/issues/comments/385961621","html_url":"https://github.com/mysqljs/mysql/issues/2006#issuecomment-385961621","issue_url":"https://api.github.com/repos/mysqljs/mysql/issues/2006","id":385961621,"user":{"login":"vgaltes","id":862679,"avatar_url":"https://avatars3.githubusercontent.com/u/862679?v=4","gravatar_id":"","url":"https://api.github.com/users/vgaltes","html_url":"https://github.com/vgaltes","followers_url":"https://api.github.com/users/vgaltes/followers","following_url":"https://api.github.com/users/vgaltes/following{/other_user}","gists_url":"https://api.github.com/users/vgaltes/gists{/gist_id}","starred_url":"https://api.github.com/users/vgaltes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgaltes/subscriptions","organizations_url":"https://api.github.com/users/vgaltes/orgs","repos_url":"https://api.github.com/users/vgaltes/repos","events_url":"https://api.github.com/users/vgaltes/events{/privacy}","received_events_url":"https://api.github.com/users/vgaltes/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T12:31:10Z","updated_at":"2018-05-02T12:31:10Z","author_association":"NONE","body":"Thanks, I'll make the change if I get the error again. The problem is that we're not able to reproduce this locally and the machines on production get rebooted. I'll keep you updated. Thanks!"}}
{"actor":{"display_login":"vgaltes"}}