You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Failure messages on the console as long as DB is down.
What is actually happening?
The whole process crashes with error:
<project_dir>\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:166
return this.pool[mayBeConnection.queryType].destroy(mayBeConnection)
^
TypeError: Cannot read property 'destroy' of undefined
at Object.destroy (<project_dir>\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:166:53)
at Connection.errorHandler (<project_dir>\node_modules\sequelize\lib\dialects\mysql\connection-manager.js:103:23)
at emitOne (events.js:116:13)
at Connection.emit (events.js:211:7)
at Connection._notifyError (<project_dir>\node_modules\mysql2\lib\connection.js:229:16)
at Socket.<anonymous> (<project_dir>\node_modules\mysql2\lib\connection.js:107:16)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Dialect: mysql Dialect version: mysql2 v.1.5.3 Database version: 5.7.22, 5.6.40 Sequelize version: 4.37.10 Tested with latest release: Yes
The text was updated successfully, but these errors were encountered:
For what I found during debugging abstract/connection-manager.js on line 166 assumes that mayBeConnection.queryType is set but it is undefined.
I believe it is due to the fact that mysql/connection-manager.js registers error handler on connection before the connection gets queryType assigned (here or here)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment 🙂
What are you doing?
When using
replication
configuration withmysql
dialect the whole nodejs process crashes when connection to database is lost.To reproduce it locally turn DB on, start the code below and after one or more
Success
messages turn DB off.What do you expect to happen?
Failure
messages on the console as long as DB is down.What is actually happening?
The whole process crashes with error:
Dialect: mysql
Dialect version: mysql2 v.1.5.3
Database version: 5.7.22, 5.6.40
Sequelize version: 4.37.10
Tested with latest release: Yes
The text was updated successfully, but these errors were encountered: