-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Description
When using the driver to connect to mysql over our network, the node event loop blocks until all of the results are returned. This does not occur when using the instance of mysql running on my local machine or with the JDBC mysql driver over the network so it seems like there’s some interaction between the driver and our network.
I've posted the test code I’m using below, but am not really sure about the next steps to debug the problem so any suggestions would be appreciated.
mySql = require('mysql')
conn = mySql.createConnection
host : ''
port : '4930'
user : ''
password : ''
database : ''
insecureAuth : true
conn.connect()
conn.query "SELECT * from users", (err, rows) =>
if err
console.error err.message
else
delta = new Date() - last
console.error('EVENT LOOP BLOCKED FOR', delta, "ms")
console.log rows.length
throw "done"
conn.end()
last = new Date()
setInterval( ->
delta = new Date() - last
if (delta > 2)
console.error('EVENT LOOP BLOCKED FOR', delta, "ms")
last = new Date()
, 1)
Metadata
Metadata
Assignees
Labels
No labels